Expand the DrawingEvents Object to include the event "OnParameterChange" like the ModelingEvents Object has

Expand the DrawingEvents Object to include the event "OnParameterChange" like the ModelingEvents Object has

dwlawrence
Contributor Contributor
127 Views
1 Reply
Message 1 of 2

Expand the DrawingEvents Object to include the event "OnParameterChange" like the ModelingEvents Object has

dwlawrence
Contributor
Contributor

Not sure if this is possibly included in the INVGEN-3643 scope, but it'd make it a lot easier to focus in on a parameter by name if the DrawingEvents included OnParameterChange that you could listen to. Especially if you're in an iLogic rule that's triggered on any parameter change, instead of either writing out it's "before" and "after" values that have been changed by another rule, to a text file using System.IO or (providing you don't have anything triggered off a property change) writing it's before value to an iProperty and then doing the before/after comparison.

 

The "OnRetrieveDimensions" is still the only event on this object I see in Inventor 2026 as well, so it'd be nice to expand it a bit.

0 Likes
128 Views
1 Reply
Reply (1)
Message 2 of 2

WCrihfield
Mentor
Mentor

Hi @dwlawrence.  You may want to search within the 'Inventor Ideas' forum for a port requesting that, and if you do not find an existing 'idea' for that, you can create a new 'idea' post for it there.  If you do end up creating a new Idea post for this, it would be good to post a Link to that Idea post here in this conversation, to help direct others to that Idea, so they can vote for it.  Posting your request here will likely not get you very far, unless just looking for help with writing the code.

Beyond that, how familiar are you with 'handling' events using custom 'EventHandler' codes, instead of using the iLogic Event Triggers dialog?  If you are comfortable with that idea, then you might look into the following:

Application.ModelingEvents (Property)

ModelingEvents (Object)

ModelingEvents.OnNewParameter (Event)

ModelingEvents.OnParameterChange (Event)

Both of those events offer:  The owning Document, the Parameter object, 'before vs after' timing control, 'on change' offers some 'context', but neither let us 'abort' the action.  I don't recall doing much research into those events as it relates to drawings, but since we can create UserParameters in drawings, it seems logical to assume that it may be possible.  When using those events, we can check the name of the parameter, to ensure we are only reacting to specifically named parameter(s), in specific Document(s).

Edit:  Yep, I just checked, and those events work for DrawingDocument type documents, as expected.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes