Change iProperty Material Using VBA

Change iProperty Material Using VBA

isocam
Collaborator Collaborator
2,257 Views
1 Reply
Message 1 of 2

Change iProperty Material Using VBA

isocam
Collaborator
Collaborator

Can anybody help?

 

I am trying to change the iProperties "Physical" "Material" using an Inventor VBA macro

 

Can anybody tell me how this can be achieved?

 

For example, say the material is set to "DEFAULT" and I want to change it to "TITANUIM", how can I do this using VBA?

 

Many thanks in advance!!!!

 

IsoCAM

0 Likes
2,258 Views
1 Reply
Reply (1)
Message 2 of 2

YuhanZhang
Autodesk
Autodesk

If you want to change the material of the document you should use the PartDocument.ComponentDefinition.Material to change it.

 

If you change the property of material, it won't really change the document material, but you can do it with below code:

 

PartDocument.PropertySets(3).Item("Material").Value = "Titanium"

 



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.