Opening a document.occurence from assembly

Honored Contributor
Honored Contributor

Hi,

 

it would like to go through several occurences within an assembly and for sheetmetal part I would like to save the flat pattern to DXF.

 

So far OK, but at the moment I open the PSM document with an SEApp.Documents.Open(strPSMDoc) statement.

 

This is OK as long as no interpart relation (variables) is established for those documents, since then there will be an interactive question wether to open or not the assembly, but this already is opend and the macro can not run as designed.

 

So finally my question will be:

 

Is there a command to InPlaceActivate the part from the assembly instead of open it?

 

 

 



regards
Wolfgang
3 REPLIES

Betreff: Opening a document.occurence from assembly

Honored Contributor
Honored Contributor

Hi,



in the meantime I have found my answer:

 

using the code line 

 

SEApp.DisplayAlerts = False

 

prevents SE from asking me interactively during the batch job run

 

Nevertheless

Thanks to all

 

 



regards
Wolfgang

Re: Opening a document.occurence from assembly

Phenom
Phenom

Hi Wolfgang:

 

Does using OccurrenceDocument apply in your case ?

 

Dim seOccurrence As SolidEdgeAssembly.Occurrence
Dim seDocument As SolidEdgeDocument = seOccurrence.OccurrenceDocument

Regards,

~Tushar

Re: Opening a document.occurence from assembly

Honored Contributor
Honored Contributor

Hi @Tushar,

 

 

 

no unfortunately not.

I was going to automatically save all flatten patterns from the assembly structure to DXF

And to do this it is necessary to open the PSM files rather then access the document.

The accees still is OK for changing properties, variables etc. but to save the flat by API I only have found the way to open the sheetmetalf file.

And as long as there was an interpart connection established between those files the open command wants to open the asm instead.

 

But as mentioned in previous message there is an setting available to preent interactive question during the batch run.

 

 



regards
Wolfgang