Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I used the following codes to get a SelectionSet from a drawing sheet, but I cannot get anything. The Visual Studio send tips: cannot make the System._ComObject to Inventor.SelectionSet.
Here are my code:
SelectSet selectSet = null;
if (drawingDocument.SelectSet.Count == 0)
{
Console.WriteLine("Select a drawing view");
//selectSet = inventorApp.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select a drawing view");
selectSet = inventorApp.CommandManager.Pick(SelectionFilterEnum.kDrawingSheetFilter, "Select drawing sheet!");
}
else
{
selectSet = drawingDocument.SelectSet;
}
After running the codes, I choosed the red line, (of course, the other lines are banned to choose), and the Visual Studio send the message : cannot make the System._ComObject to Inventor.SelectionSet.
I am very confused about it. How should I get the SelectionSet?
Solved! Go to Solution.