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

Hi there, and in different words, as far as I got, do some of you maybe know how to decifer if a level of detail actually exists?

 

Just after suppressing a part in an assembly, I can get the active LOD and then my way was to use Try (Catch) to activate the LOD (if existing), which unfortunately always succeeds, it just writes a new actual one. When the active LOD actually exists there is no problem, but when there only is a temporary one it will generate new LOD everytime I save.

 

Dim asDoc As AssemblyDocument = ThisDoc.Document
aComp = asDoc.ComponentDefinition

'Position der Detailgenauigkeit erfassen
Dim ActLOD As String = aComp.RepresentationsManager.ActiveLevelOfDetailRepresentation.Name

Try aComp.RepresentationsManager.LevelOfDetailRepresentations.Item(ActLOD).Activate(True) 'MsgBox(ActLOD & " gesetzt") Catch AcLOD = "TempDetailgenauigkeit" 'MsgBox(AcLOD & " erstellt") 'Finally aComp.RepresentationsManager.LevelOfDetailRepresentations.Add(AcLOD) 'MsgBox(AcLOD & " aktiviert") End Try