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: 

iLogic code to close ipt file....

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
4985 Views, 4 Replies

iLogic code to close ipt file....

Hello!

Can someone help me with this? Looking for the ilogic code to place in the drawing rule to close *.ipt file that was recently open.

 

Thank you, Any help appreciated

 

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

Also looking for the way to switch between open tabs drawings or ipt, iam files.

Thank you.

Message 3 of 5
Anonymous
in reply to: Anonymous

ok. I found the solution.

Thank you.

Dim oPart As PartDocument

oPart = ThisApplication.Documents.Open(filename, False)

oPart.Close

 

 

 

 

 

Message 4 of 5
mwighton
in reply to: Anonymous

how would you close an assembly file?

Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton
Message 5 of 5
mwighton
in reply to: mwighton

i figured it out. I was missing the extension for the file name i was trying to close.

 

SyntaxEditor Code Snippet

opendoc = ThisDoc.PathAndFileName()'saves doc path and file name
doc = ThisApplication.Documents.Open(opendoc & ".iam")'saves 'doc' as the open application from 'opendoc' adding the extension '.iam'
doc.Close 'closes the indicated document 'doc'
Did this post help out? Hope it did.
If so please use the 'Accept as Solution' or 'Kudos' Button below.
God Bless

Mwighton

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

Post to forums  

Autodesk Design & Make Report