Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Open an Ipt file invisibly

Anonymous

Open an Ipt file invisibly

Anonymous
Not applicable

Hi,

 

I would like to open a ipt file which is my "Template". however I would like to open it invisibly whilst I make my adjustments is this possible?

 

I tryed the following but that isnt going to work...

 

                oApp = Marshal.GetActiveObject("Inventor.Application")
                oDocs = oApp.Documents
                oDoc = oDocs.Open("C:\Template.ipt", True).Visible = False 
0 Likes
Reply
Accepted solutions (1)
388 Views
1 Reply
Reply (1)

Owner2229
Advisor
Advisor
Accepted solution

Hi, aren't you trying to create new part using your template? For it works the code below:

 

Dim g_App As Inventor.InventorServer = ThisApplication
Dim oNewPart As AssemblyDocument
oNewPart = g_App.Documents.Add(DocumentTypeEnum.kPartDocumentObject, , True)

Else use the folowing: (False to open it invisibly)

 

oApp = Marshal.GetActiveObject("Inventor.Application")
oDocs = oApp.Documents
oDoc = oDocs.Open("C:\Template.ipt", False)
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
0 Likes