Highlighting Edges from a Wire Object

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am attempting to mess around with Wire objects in the API to get a sense of what they do, as the documentation on them seems kind of slim.
I am getting an "HRESULT: 0x80070057 (E_INVALIDARG))" error when I am attempting to highlight the edges found within an Wire object. Can anyone tell me where the issue lies? Below is a subset of my code. I follow the typical naming conventions found in the Inventor VBA/C# samples, and oHSet is my HighlightSet object:
Wires oWires;
oWires = oCompDef.Features.ExtrudeFeatures[2].Profile.Wires;
foreach (Wire oWire in oWires)
{
foreach (Edge oEdge in oWire.Edges)
oHSet.AddItem(oEdge);
}
I can count the Wires (there are 4), get the actual Edge objects and their type, however I cannot highlight them. Is there a reason for this? Any clarification would be great, as the API documentation on them is non-existent (a blank page comes up).
Thanks for any help,
Philip