Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have hit a wall when trying to figure out how to retrieve "Thread" feature through selection. Here's the code sample.
The Selection Filter:
InteractionEvents.SelectEvents.AddSelectionFilter(SelectionFilterEnum.kPartFeatureFilter);
The OnSelect Event Handler:
void SelectEvents_OnSelect( ObjectsEnumerator JustSelectedEntities, SelectionDeviceEnum SelectionDevice, Point ModelPosition, Point2d ViewPosition, Inventor.View View) { foreach (System.Object obj in JustSelectedEntities) { var threadFeature = obj as ThreadFeature; if (threadFeature != null) { ThreadInfo threadInfo = threadFeature.ThreadInfo; //Do something with threadinfo } } }
This always pick up the Extrude feature when I click on a part (cylinder extrusion + thread). And I want to have instead the thread feature to be picked up by the selection.
Am I doing something wrong here? Please fill me in.
Wangdu
Solved! Go to Solution.