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

I've tried something like this, but can't set the ActiveMaterial I've retieve. Thanks

    Dim Doc As Document
    Dim pDoc As PartDocument
    Dim material As MaterialAsset
    
    Set Doc = ThisApplication.ActiveDocument
    Set pDoc = ThisApplication.ActiveDocument

   
    For Each material In Doc.MaterialAssets
    
        If material.IsUsed Then
     
        pDoc.ActiveMatrial = material.DisplayName '(??? I don't know how to set)
             
        Else
     
        End If

    Next