Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problems with the home view

5 REPLIES 5
Reply
Message 1 of 6
juliengoertz
138 Views, 5 Replies

Problems with the home view

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

5 REPLIES 5
Message 2 of 6

Removed by me 🙂

If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
Message 3 of 6
juliengoertz
in reply to: juliengoertz

That is too bad. Thanks anyways 😁

Message 4 of 6
juliengoertz
in reply to: juliengoertz

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?

Message 5 of 6
juliengoertz
in reply to: juliengoertz

The document even looks different when i open it with the API vs opening it with my hand:
API:

juliengoertz_2-1713190154083.png

 

By hand:

juliengoertz_1-1713190078768.png

What am i doing wrong?

Message 6 of 6
juliengoertz
in reply to: juliengoertz

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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report