Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programmatically making all inputs non-consumed

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
tomtn
342 Views, 2 Replies

Programmatically making all inputs non-consumed

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? 

 

 

 

2 REPLIES 2
Message 2 of 3
adam.nagy
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
Autodesk Platform Services
Message 3 of 3
tomtn
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!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report