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: 

Can I activate a custom LOD from iLogic?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1946 Views, 4 Replies

Can I activate a custom LOD from iLogic?

I've found a multitude of information on iLogic and LOD's, but from everything I've read, I have to manually set the LOD before running my iLogic rule. I have found nothing to explain how to activate a specific LOD from within the iLogic rule itself. I find this hard to believe, but can this not be done via code?

Basically, I want to activate a custom LOD, run some code, and then put the LOD back to 'Master'. Or, even better yet, have iLogic create my LOD first, activate it, etc.

Am I just missing something in all of these documents? Or do I simply have to set my LOD first and then create/run my code? Thanks!

Scott
Inventor 2011 Suite
Vista Ultimate x64
4 REPLIES 4
Message 2 of 5
MjDeck
in reply to: Anonymous

 You can activate an LOD from an iLogic rule, using API code.  But I wouldn't recommend it.  Changing the LOD is a heavyweight operation: each LOD is like a separate assembly document.  If you have made changes in the current LOD, Inventor will ask you if you want to save them before switching.

 

 If you were to activate a custom LOD, run some code, and then put the LOD back to Master, then you wouldn't see the changes in the custom LOD.  That's the only place where you can see the components that are suppressed and unsuppressed.   And component suppression is the only reason you need a custom LOD for iLogic rules.  If you have rules that don't need to suppress and unsuppress, then you can run them in the Master LOD.

 

 If you do need to suppress and unsuppress, I recommend leaving the assembly in the custom LOD.  You can save it and when you re-open it it will open in the custom LOD again (by default).  The LOD can become your working environment for that particular assembly.


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 5
Anonymous
in reply to: MjDeck

Thanks for the reply, Mike, and the information.

 

My desire was to run a code that calculated the height and width of an assembly for crating. However, we have some components in our assembly that won't actually be installed before crating (I know, don't ask!) but rather on site later. Therefore, I was hoping to write a quick routine that would suppress these components, measure the assembly, and then unsuppress the components again.

 

However, I can do it as you've mentioned, with a custom LOD active. I will attempt now to set error trapping in the event that a user tries running the code with the wrong LOD active...

 

Thanks again.

Message 4 of 5
mark5DGVX
in reply to: Anonymous

how do i sed it to custom lod?

 

mark5DGVX_0-1645011544086.png

 

Message 5 of 5
MjDeck
in reply to: mark5DGVX

@mark5DGVX , to create a new custom LOD in Inventor 2021 and earlier, right click on Level of Detail in the assembly browser.
New Level of Detail.png

 

If a custom LOD already exists, then double-click on it to activate it.


Mike Deck
Software Developer
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report