Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @dutt.thakar, thanks for the input,

 

unfortunately exactly this does not work.

You can try the following :

  1. Have an assembly with 2 parts
  2. Save it
  3. Suppress one of the parts, this will generate a new active LOD
  4. run the code (dont save), the active LOD will be shown in the list of the existing LOD's although it doesn't
  5. 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)