Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I am trying to create an iLogic code that can create an associative view representation in an assembly. Right now I am stuck on just getting the view representations created in each component of my assembly. I continue to get the error Public member 'RepresentationsManager' on type 'ComponentOccurence' not found. Any help would be greatly appreciated.
Dim oDoc As Document Dim oCompDef As ComponentDefinition oDoc = ThisApplication.ActiveDocument oCompDef = oDoc.ComponentDefinition For Each oOcc In oCompDef.Occurrences If Component.IsActive(oOcc.Name) If oOcc.DefinitionDocumentType = DocumentTypeEnum.kPartDocumentObject Dim oviewrep As DesignViewRepresentation Try MsgBox("Got Here") oOcc.SetDesignViewRepresentation("Custom",, True) Catch MsgBox("Got Here") oviewrep = oOcc.RepresentationsManager.DesignViewRepresentations.Add("Custom",True) oviewrep.activate End Try End If End If Next iLogicVb.UpdateWhenDone = True
Solved! Go to Solution.