Are there any events that will fire when a user changes material/appearance with QAT comboboxes?
UserInputEvents.OnActivate/OnTerminate/Command doesn't
DocumentEvents.OnChange doesn't
(Inventor 2020/21/22)
Thanks
Christoph
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
The iproperties event should fire. Or you could look for a change in material or appearance and use that as the trigger. Can you give more information if this doesn’t answer the question.
Thanks, What do mean with "iproperties event". I don't see an event relatetd to iProperties.
Regards,
Christoph
Most likely what you need is material change event trigger. The iproperty trigger seems to relate to manually entered iproperties. If you select a material in a combo box you will likely need it to be held in a parameter to get the rule to fire on parameter change and actually change the material.
Sorry my question was not clear enough. I missed to say that this question is related to the .net API, not iLogic.
I need a solution without iLogic.
Regars
Christoph
Hi @C-Hoppen. I believe those types of changes were meant to be handled by the Events listed under the StyleEvents object (. But they don't seem to have been fully developed yet. Their online help pages have statements under them that say things like "under development", "not supported", "as-is", & use "at your own risk". I attempted to create a simple example in a test part document, but so far it just keeps throwing errors without working as planned.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb:or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)
Thank you for pointing this out!
I don't know why, but I've always been under the misconception that style events have to do with drawings.
This works for me:
StyleEvents styleEvents = inventorApp.StyleEvents;
styleEvents.OnActivateStyle += StyleEvents_OnActivateStyle;
...
void StyleEvents_OnActivateStyle(Inventor._Document DocumentObject, object Style, Inventor.EventTimingEnum BeforeOrAfter, Inventor.NameValueMap Context, out Inventor.HandlingCodeEnum HandlingCode)
{
if (BeforeOrAfter == Inventor.EventTimingEnum.kAfter && DocumentObject.DocumentType == Inventor.DocumentTypeEnum.kPartDocumentObject)
{
UpdateIpropertyBrowser();
}
HandlingCode = Inventor.HandlingCodeEnum.kEventHandled;
}
Thanks,
Christoph
Can't find what you're looking for? Ask the community or share your knowledge.