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

This is straight from my addin and it works for me. This allows you to take an existing material and set it for the file.

 

            ' Get the asset that corresponds with the selected material
            Dim oAsset As Asset
            oAsset = EM_AddIn.StandardAddInServer.m_inventorApplication.AssetLibraries.Item("EllimetalMaterialLibrary") _
                .MaterialAssets.Item("Material name here")

            ' Set the document material
            oDoc.ActiveMaterial = oAsset

Your code seems odd to me to always add a material to use it. Just use a existing one.



Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2