Good day everyone,
I have a problem with a piece of rendering software i made for a client.
When i use the following command: _inventorApplication.ActiveView.GoHome(); Inventor zooms to fit. While the home view is made at a fixed distance. When i do it by hand it does not happen. It is impossible for me to recreate the problem, it only happens on the clients pc. Is there some setting i overlooked? Or is there another method that i can use that does not zoom at all when going to home? Am i doing something wrong?
Any help would be greatly appreciated.
Thanks in advance
Removed by me 🙂
I have reproduced the issue. It only seems to happen when i open a document using the Inventor API. So if i use the following method: _inventorApplication.Documents.Open(doc); This is inside a for each which needs to open all the documents that need to be rendered. Before the loop i close all active documents. But if i don't do this it also just works. If i open it via the API it just zooms to fit when opening and does not change anything when i use the "GoHome" method on the active view. Does anyone know why this is? TLDR: Issue only happens when i close all documents and open using the Inventor API. Why?
The document even looks different when i open it with the API vs opening it with my hand:
API:
By hand:
What am i doing wrong?
This issue is solved by changing the DesignView. But it seems like i lose the Homeview if i open it using the Inventor API. When i look inside the method in the Programming help from Inventor, it says the following:
Input String that specifies the full document name of the document to open. If only the FullFileName is specified for part and assembly documents, the master document within the file is opened. But i don't think i need to open the master Document. The following code doesnt give me the result i need:
Inventor.FileManager fileManager = _inventorApplication.FileManager;
string LastDM = fileManager.GetLastActiveModelState(doc);
string fullDocName = fileManager.GetFullDocumentName(doc, LastDM);
Inventor.AssemblyDocument assyDoc = _inventorApplication.Documents.Open(fullDocName) as Inventor.AssemblyDocument;
Doesn anyone have another idea on how to open the document normally using the API?
Can't find what you're looking for? Ask the community or share your knowledge.