iProperty Change Event Trigger not firing

iProperty Change Event Trigger not firing

Max_Ted13
Explorer Explorer
306 Views
2 Replies
Message 1 of 3

iProperty Change Event Trigger not firing

Max_Ted13
Explorer
Explorer

Hello,

I have created a VBA macro that changes the name of a Finish Feature to it's Short Description property but it can only run manually. I want to automate this such that when a Finish Feature is created, the macro runs and changes the name automatically. My idea was to create an iLogic rule that runs the macro and use the iProperty Change event trigger to run the rule. In order for this to work, the "Export all Finish Parameters" checkbox would need to be checked (I do not want to automate that part, don't worry). By selecting that check box, it creates custom iProperties of all the Finish Feature properties (Appearance, Description, Thickness, etc.) however it does not fire the iProperty Change event trigger. If I manually edit any of the custom iProperties it fires. Is this something that should be firing the iProperty Change event trigger and it's just a bug, or is the creation of these iProperties somehow done differently where the iProperty Change event trigger would not pick it up?

 

 

Thanks,

Nick

 

0 Likes
307 Views
2 Replies
Replies (2)
Message 2 of 3

robbeRtek
Advocate
Advocate

just make simple new local rule 'trigger for edit finish feature'; don't add it to event triggers


dim trigger as boolean= param("Export all Finish Parameters" checkbox)
iLogicVb
.RunMacro(....)

 check fire options, set them like the screenshot,
if you change the boolean, it fire the rule 

Thanks to accept solution

0 Likes
Message 3 of 3

WCrihfield
Mentor
Mentor

Hi @Max_Ted13.  Those custom iProperties that only exist due to a parameter being set to export will not trigger the "iProperty Change" event you see in the Event Triggers dialog when you just change the value of the parameter.  That action of keeping the custom iProperty updated to the parameter is handled by a special process that we do not have any control over, other than that checkbox.  I was thinking that you might instead be able to use the "Any Model Parameter Change" event in the Event Triggers dialog, but in a quick test, I can see that is not working either.  You may need to create a custom event handler code to deal with a complicated situation like this one.  There are other ways to monitor for changes to iProperties and/or parameters, which would allow you a lot more control than using the very basic functionality of the Event Triggers dialog.  But creating and using custom event handlers from iLogic rules is more complicated and more difficult to manage, and usually best suited for Inventor add-ins.  And trying to monitor iProperties that way is a lot more complicated than it might seem, because it is bundled in with a lot of other types of document changes which need to be filtered out.  Monitoring for parameter changes is a lot more direct, because there is an event handler routine just for that generic event.  

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes