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: 

PropertySets Item method not defined (c#)

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
awatt
143 Views, 3 Replies

PropertySets Item method not defined (c#)

I'm porting some code from VB to c#, and I'm being told the PropertySets object doesn't have an item method defined.

 

awatt_1-1699018914954.png

awatt_2-1699018955368.png

 

The Item method doesn't show up in the VS object browser.

 

I have a 'using Inventor;' statement, and a reference to autodesk.inventor.interop.  So far everything else has worked as expected.

 

What should I be looking for?

Labels (1)
3 REPLIES 3
Message 2 of 4
WCrihfield
in reply to: awatt

Hi @awatt.  I am not good with C#, but since the Item property is its default one, you may be able to simply use a ["propertyset name"] right after the oDoc.PropertySets, like this:

Inventor.PropertySet statusPropertySet = oDoc.PropertySets["Design Tracking Properties"]

just a guess, based on what I've seen before.

Wesley Crihfield

EESignature

Message 3 of 4
awatt
in reply to: WCrihfield

@WCrihfield  I think you might be right.  The code formatter accepted it, but it will be a while before I can compile and fully test.

 

Thank you.

Message 4 of 4
Frederick_Law
in reply to: awatt

WCrihfield is correct.

 

Also try this:

https://github.com/icsharpcode/CodeConverter

 

I converted my VS VB template to C# with it.

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

Post to forums  

Autodesk Design & Make Report