
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear member,
I'm trying to make a simple program in c# to open and close document in Inventor.
So far everything is run perfect with normal inventor. Instead of opening/viewing the Drawing in Inventor that take times to load (im using low spec laptop) i want my program to open the drawing in Inventor View that installed on my laptop because it lighter and faster. and the problem is i don't know the code to run Inventor view instance.
what i've tried so far
adding COM reference InventorApprentice still can't find the object to run Inventor View
this is the code i used to run Inventor from my windows from
private void button1_Click(object sender, EventArgs e) { Inventor.Application inventorApp = null; // object // it is not possible to write InventorApprentice.Application try { try { inventorApp = (Inventor.Application)Marshal.GetActiveObject("Inventor.Application"); inventorApp.Visible = true; } catch { // Start Inventor. System.Type oType = System.Type.GetTypeFromProgID("Inventor.Application"); MessageBox.Show("Starting Inventor. This may take afew minutes"); inventorApp = (Inventor.Application)System.Activator.CreateInstance(oType); // Make Inventor visible. inventorApp.Visible = true; //inventorApp.Documents.Open; open file } }
i hope you can help me to make my windows form to run INventor View instead of normal Inventor
Solved! Go to Solution.