03-03-2021
10:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-03-2021
10:38 PM
Hi @dutt.thakar, thanks for the input,
unfortunately exactly this does not work.
You can try the following :
- Have an assembly with 2 parts
- Save it
- Suppress one of the parts, this will generate a new active LOD
- run the code (dont save), the active LOD will be shown in the list of the existing LOD's although it doesn't
- There seems to be no place/option where to look for the actual existing LOD's
I wrote a kind of a workaround now, where i simply assume that if the active LOD is the last one in the list it doesn't exist. Which is well ok as long as not the Last one is active.
Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As ComponentDefinition = oDoc.ComponentDefinition Dim ActLOD As String = oDef.RepresentationsManager.ActiveLevelOfDetailRepresentation.name Dim oList As New ArrayList For i As Integer = 1 To oDef.RepresentationsManager.LevelOfDetailRepresentations.count oList.Add( oDef.RepresentationsManager.LevelOfDetailRepresentations(i).name) Next 'oList.Add(oDef.RepresentationsManager.ActiveLevelOfDetailRepresentation.Name) oValue = InputListBox("Select LOD", oList, ActLOD, "Ilogic - LOD", "Available Selections") oDef.RepresentationsManager.LevelOfDetailRepresentations.Item(oValue).Activate(True)