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: 

Changing Material/Appearance with ComboBoxes in QAT doesn't fire Events?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
C-Hoppen
385 Views, 6 Replies

Changing Material/Appearance with ComboBoxes in QAT doesn't fire Events?

CHoppen_0-1623942299427.png

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

6 REPLIES 6
Message 2 of 7
A.Acheson
in reply to: C-Hoppen

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. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 7
C-Hoppen
in reply to: A.Acheson

Thanks, What do mean with "iproperties event". I don't see an event relatetd to iProperties.

Regards,

Christoph

Message 4 of 7
A.Acheson
in reply to: C-Hoppen

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.

AAcheson_0-1624222176107.png

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 5 of 7
C-Hoppen
in reply to: C-Hoppen

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

Message 6 of 7
WCrihfield
in reply to: C-Hoppen

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

EESignature

(Not an Autodesk Employee)

Message 7 of 7
C-Hoppen
in reply to: C-Hoppen

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.

Post to forums  

Technology Administrators


Autodesk Design & Make Report