Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Background action

0 REPLIES 0
Reply
Message 1 of 1
mk92
163 Views, 0 Replies

Background action

Hello,

 

i try to do this:

 

ThisApplication.Documents.Open("XYZ.ipt")

 

but the file should open in the background. Not as the active document.

 

Then i want to save this Document in the background as a step (using the snippet)

 

' Set reference to active document.
oDoc = ThisApplication.ActiveDocument

' Check the Document type is an assembly or part
If (oDoc.DocumentType <> kAssemblyDocumentObject And _
   oDoc.DocumentType <> kPartDocumentObject) Then
   MsgBox("Error:Document type is not assembly/part")
   Exit Sub
End If

' Get document's full file name
sFname = ThisDoc.PathAndFileName(False) & ".sat"

' Do a 'Save Copy As' to SAT format
oDoc.SaveAs(sFname, True)

But in my case oDoc isn't the active document. How can i use the "inactive" document in the background?

 

I looked in the help files but found nothing about this case!

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report