Interactive workfeature selection

Interactive workfeature selection

mat_hijs
Collaborator Collaborator
761 Views
3 Replies
Message 1 of 4

Interactive workfeature selection

mat_hijs
Collaborator
Collaborator

I'm trying to write a rule to make constraints by selecting 3 workfeatures in the first part, and then the 3 corresponding workfeatures in the second part. I'd like it to ask to select specific workfeatures, for example a messagebox or tooltip saying: "Select workfeature 1" and then "Select workfeature 2" and so on.

I've been looking in the API/Programming help, and I think I've almost found where I need to be, the interaction events, but I can't even get the sample programs to work for me. How should I deal with this?

0 Likes
Accepted solutions (2)
762 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Are you talking about the Pick function?

Dim oWPlane As WorkPlane = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kWorkPlaneFilter, "Select a WorkPlane.")

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

If you have time, please... Vote For My IDEAS 💡and Explore My CONTRIBUTIONS

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

WCrihfield
Mentor
Mentor
Accepted solution

Also, keep in mind that when working from an active assembly document and its components and sub components, you always have to create Proxy objects to represent them within the context of the assembly.  So for each component WorkPlane you select, you will need to create a WorkPlaneProxy object for it before you can use it.  The option to create Proxy objects is from the ComponentOccurrence object.

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 4 of 4

mat_hijs
Collaborator
Collaborator

Exactly what I needed, thanks!

0 Likes