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

@fce 

Those are actually two different things (iam and ipt). For an iam, the appearance shown in that dropdown is the appearance set to the selected occurrence in that assembly. The appearance in the document can be something else. So an assembly document in itself can't have an active appearance, only the occurrences of that assembly.

Do I make any sense to you? :grinning_face_with_smiling_eyes:

 

This code however will give you the active appearance of all parts :slightly_smiling_face:

Dim oAsmDoc As AssemblyDocument = ThisDoc.Document
Dim oAppearances As String = "Appearances:" & vbCrLf
For Each oRefDoc As Document In oAsmDoc.AllReferencedDocuments
If oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject
	Dim oAppearance As String = DirectCast(oRefDoc, PartDocument).ActiveAppearance.DisplayName
	oAppearances = oAppearances & vbCrLf &  oRefDoc.DisplayName & "	" & oAppearance
End If			
Next
MessageBox.Show(oAppearances, "Appearance list")