Autodesk Inventor Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Programmat ically making all inputs non-consum ed
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I need to be able to programmatically set all inputs to be non-consumed for a C# Inventor 2013 add-in I'm writing. I'm doing this:
InventorPart = (Inventor.PartDocument)Program.InventorApp.ActiveDocument;
foreach(Inventor.PartFeature ipf in InventorPart.ComponentDefinition.Features) { ipf.ConsumeInputs = false; }
Seems straightforward. But when I run it, I get "COMException was unhandled - Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))". Researching this, it looks like it's just a generic COM error.
Any ideas?
Solved! Go to Solution.
Re: Programmat ically making all inputs non-consum ed
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
As far as I know only Stitch and Sculpt features support that, but there might be others.
If you right-click a feature in the user interface and the context menu shows "Consume Inputs" then it is supported for that specific feature type otherwise not. If you get an exception when trying to set it through the API, then it's not supported.
Cheers,

Adam Nagy
Developer Technical Services
Autodesk Developer Network
Re: Programmat ically making all inputs non-consum ed
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Ok, I was trying to do the similar thing for sketches (sharing sketches) and thought it was the same, but turns out it has its own option. Thanks!
