09-10-2020
01:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-10-2020
01:12 AM
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? ![]()
This code however will give you the active appearance of all parts ![]()
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")
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website