Sample iLogic code that links Level of detail to a Positional Representation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I have an assembly with several Levels Of Detail and I want Positional Representations to change accordingly. Does any have a sample of an iLogic code that associates LOD with Positional Representations; or can someone let me know what is wrong with the code below;
Dim oAsmCompDef As AssemblyComponentDefinition
Dim oLOD As LevelOfDetailRepresentation
oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
If oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("LOD_A") Is active Then
oAsmCompDef.RepresentationsManager.PositionalRepresentations.Item("PR_A").activate
ElseIf oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("LOD_B") Is active Then
oAsmCompDef.RepresentationsManager.PositionalRepresentations.Item("PR_B").activate
End If
Thanks