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: 

Triggering an iLogic Rule When Design View Representation Changes

3 REPLIES 3
Reply
Message 1 of 4
kparsa
714 Views, 3 Replies

Triggering an iLogic Rule When Design View Representation Changes

Hi,

 

I have created a conical spring in a part file. To be able to show the spring in both compressed and uncompressed states, I have created two views called Compressed and Uncompressed. In addition, I have created an iLogic rule which changes the length of the part depending on which view is active. However, the problem that I have is that (1) when the design view representation changes, the rule is not triggered, and there is no option for making it trigger automatically after a view change, and (2) even after the rule is manually triggered, I have to click the local update button to get the length change to show.

 

I know that I can create the spring as an assembly file with two parts in it, one showing the spring in compressed stated and the other in the uncompressed state. But I was trying to see if this can be done within one single part file.

 

Thanks in advance,

 

Running Inventor 2014 SP1 Update 2 on Windows 7 (64)

3 REPLIES 3
Message 2 of 4
philippe.leefsma
in reply to: kparsa

Hi

 

iLogic offers pretty limited way to customize Inventor when it comes to events unfortuntely. I don't think there is a way your iLogic rule can react to an event such as Design View Representation change.

 

This kind of customization is pretty straighforward to handle when working with either VBA or a .Net addin. You can use RepresentationEvents to trigger some custom logic.

 

You could also use an iPart which provide the kind of feature you are talking about out-of-the-box.

 

Concerning (2) did you try invoking Document.Update at the end of the rule to reflect the changes your rule is making?

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 4

Here is a blog post written by my colleague Xiaodong, you may find it useful, may you decide to use the API one day:

 

http://adndevblog.typepad.com/manufacturing/2014/01/client-feature-visibility-in-design-view-represe...

 

Regards,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 4 of 4
kparsa
in reply to: philippe.leefsma

Thank you for the response.

 

If I understand iParts correctly, that would require me to enter the length of my spring in some table. Whereas what I am trying to do is just switch between views.

 

I do have a line at the end of the rule for that purpose: ThisApplication.ActiveDocument.Update. However, even then, after any change in the rule, I still have to click the update button.

 

Thanks,

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

Post to forums  

Autodesk Design & Make Report