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: 

Edit iProperty using Apprentice and C#

2 REPLIES 2
Reply
Message 1 of 3
jedworak
1585 Views, 2 Replies

Edit iProperty using Apprentice and C#

I've been haing some issues getting the PropertySets.Item to work in C#

I've been trying to follow the VB examples in the SDK folder but I'm still scratching me head.

If you have any idea what I'm missing I would be much obliged!

 

 

Thanks,

James

 

 

Using Visual Studio 2012 with Inventer 2014 SP1

 

iProperties.jpg

 

Error:

'InventorApprentice.PropertySets' does not contain a definition for 'Item' and no extension method 'Item' accepting a first argument of type 'InventorApprentice.PropertySets' could be found.

 

2 REPLIES 2
Message 2 of 3
Vladimir.Ananyev
in reply to: jedworak

Try this style:

//Get "Inventor Summary Information" PropertySet
PropertySet oPropertySet = oApprenticeDoc.PropertySets["{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"];
//Get Author property
InventorApprentice.Property oProperty = oPropertySet["Author"];
oProperty.Value = author;

 Cheers,


Vladimir Ananyev
Developer Technical Services
Autodesk Developer Network

Message 3 of 3
jedworak
in reply to: Vladimir.Ananyev

That worked out great.

 

Working Solution added as text file below.

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

Post to forums  

Autodesk Design & Make Report