iLogic code to close ipt file....

iLogic code to close ipt file....

Anonymous
Not applicable
5,531 Views
4 Replies
Message 1 of 5

iLogic code to close ipt file....

Anonymous
Not applicable

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

 

0 Likes
Accepted solutions (1)
5,532 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

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

Thank you.

0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution

ok. I found the solution.

Thank you.

Dim oPart As PartDocument

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

oPart.Close

 

 

 

 

 

Message 4 of 5

mwighton
Collaborator
Collaborator

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
0 Likes
Message 5 of 5

mwighton
Collaborator
Collaborator

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
0 Likes