- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all I'm getting an error when ever I try to run code that moves a suppressed part features node above the End of part node. I've created some simplified C# code of what I'm doing that reproduces the error on the attached test part.
void Test()
{
//For this to run "correctly" a part document must be open with a supressed extrude feature named "Extrusion1"
//placed below the End of Part node.
try //Try to access and move the extrude feature node above the end of part node.
{
PartDocument part_doc = (PartDocument)inventor_application.ActiveDocument; //Access the part doc
BrowserPane model_pane = part_doc.BrowserPanes["Model"];//Access the model pane via the part part document.
BrowserNode EndNode = model_pane.TopNode.BrowserNodes["End of Part"]; //Access the end of part node.
BrowserNode feature_node = model_pane.TopNode.BrowserNodes["Extrusion1"]; //Access the extrude feature node.
model_pane.Reorder(EndNode, true, feature_node); //Move the extrude features node.
Debug.Print("Succeeded in moving the extrude feature");
}
catch
{
Debug.Print("Failed to move extrude feature");
}
//Run this again with the part unsupressed but below the End of Part node.
}
Any help or insites you can offer would be greatly appreciated!
Solved! Go to Solution.