Set Document from IPT that is open already

Set Document from IPT that is open already

inulobo
Advocate Advocate
466 Views
2 Replies
Message 1 of 3

Set Document from IPT that is open already

inulobo
Advocate
Advocate

 Set oModel = ThisApplication.Documents.Open("C:\temp\SheetMetal.ipt", False)

 

How do I avoid adding a direct link to the part file? I already have the part I want to work with open. How do I set that?

0 Likes
Accepted solutions (1)
467 Views
2 Replies
Replies (2)
Message 2 of 3

FINET_Laurent
Advisor
Advisor
Accepted solution

Evening,

 

This might be a start ?

Dim oDoc As Document
For Each oDoc In ThisApplication.Documents.VisibleDocuments
	If oDoc.DisplayName = "Part.ipt"
		oDoc.Activate
	End If
Next

Regards,

 

FINET L.

 

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 3

inulobo
Advocate
Advocate

Yup that's what I did. It was a pain. For some reason, it didn't work initially. Now I run a check to see if it's a part type document. Thanks for the reply.