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)
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.
Here is a blog post written by my colleague Xiaodong, you may find it useful, may you decide to use the API one day:
Regards,
Philippe.
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,