Message 1 of 4
Sub Assemblies don't update representations with any code, only manually it seems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
With an assembly inside an assembly the colours are only updated if the representation is manually altered ( or just accessed via manual). I have tried looking for a way to do this with code but it does not seem to work.
Please see screen cast video that shows this in more detail.
Is this a bug?
Dim oAsmDoc As AssemblyDocument = ThisDoc.Document Dim oAsmDef As AssemblyComponentDefinition = oAsmDoc.ComponentDefinition Dim oOcc As ComponentOccurrence Dim Occurrences As ComponentOccurrences Dim oAsmCompDef As AssemblyComponentDefinition Dim oViewReps As DesignViewRepresentations Dim oViewRep As DesignViewRepresentation Dim oViewRepName As String For Each oOcc In oAsmDef.Occurrences If oOcc.DefinitionDocumentType = 12291 Then oAsmCompDef = oOcc.Definition.Document.ComponentDefinition oViewReps = oAsmCompDef.RepresentationsManager.DesignViewRepresentations oViewRep = oAsmCompDef.RepresentationsManager.ActiveDesignViewRepresentation oViewRepName = oViewRep.Name MessageBox.Show(oOcc.Name & vbCr & oOcc.DefinitionDocumentType & vbCr & oViewRepName) 'oViewReps.Item(ViewRep).Activate oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item("Default").Activate 'oOcc.SetDesignViewRepresentation("Default", True) End If Next