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

Hi,

 

If your top assembly has a Multi Value list named e.g. "Metals" then using the following code you could check if the part that your code is checking has a material that is included in the Multi value List. 
MultiValue.List returns an ArrayList: https://msdn.microsoft.com/en-us/library/system.collections.arraylist(v=vs.110).aspx and so it has a Contains() method you can use.

values = MultiValue.List("Metals")
If values.Contains("Gold")
  MsgBox("has gold")
End If

This way you could check if the part's material is something that you should modify or not.

 

Cheers,



Adam Nagy
Autodesk Platform Services