Inventor Customization

Inventor Customization

Reply
New Member
tomtn
Posts: 2
Registered: ‎11-13-2012
Message 1 of 3 (152 Views)
Accepted Solution

Programmatically making all inputs non-consumed

152 Views, 2 Replies
11-13-2012 12:04 PM

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? 

 

 

 

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,

ADN Support Specialist
adam.nagy
Posts: 567
Registered: ‎03-26-2007
Message 2 of 3 (132 Views)

Re: Programmatically making all inputs non-consumed

11-21-2012 08:21 AM in reply to: tomtn

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
New Member
tomtn
Posts: 2
Registered: ‎11-13-2012
Message 3 of 3 (114 Views)

Re: Programmatically making all inputs non-consumed

12-21-2012 03:45 PM in reply to: adam.nagy

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!

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.