Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: utm007

Hi @utm007.  Although that iLogic shortcut snippet will work to easily change material, the actual iProperty's value is ReadOnly.  If you want to change the material of a part through VBA, you will most likely have to set a new value to the PartDocument.ActiveMaterial Property.  That is a Read/Write property, but it is wanting you to supply an Asset, instead of just a material name.  To get the Asset, you need to find the one for that material either within the document's materials (PartDocument.MaterialAssets) or one of the available material libraries (ThisApplication.ActiveMaterialLibrary).  There are other ways too, but this is the main way.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)