- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
One of the main steps in the process you are asking for is that you will need to monitor the AssemblyEvents.OnNewOccurrence Event, and catch only the specific events of when you are about to add a component that has multiple ModelStates to that specific assembly document. I have an example iLogic rule that can create the general event handler, have it focus on one specific assembly document only, then report the details of the event, each time it is triggered, to the iLogic Log window. You may be able to customize this to respond during the 'kBefore' timing period to review the ComponentDefinition that the new component will be referencing, then launch a custom Windows Form, like @Michael.Navara is suggesting, that might allow you to make some selections, then retrieve the correct ComponentDefinition, to replace the original with, then let that go through. However, one major detail that worries me about this possibility is that the online documentation for this event says that the HandlingCodeEnum variable is ignored. If that is the case, I am not sure it would allow the event handler to 'take over' control. The iLogic rule code is attached as a text file, just in case you still want to look into that angle. To use it effectively, make sure the correct assembly is visibly open on your screen when you run this rule. The event handler should go away once that specific assembly document is closed then.
Wesley Crihfield
(Not an Autodesk Employee)