Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Guido.LangeTuchscherer
811 Views, 9 Replies

Setting representation Level of Detail fails due to suppressed part

Hello nice peaople,

 

I set the LOD before doing some other stuff, which works fine as long as there is no suppressed subpart in the assembly. It crashes or fails when there is a suppressed part in the assembly, but I can't figure out why.

Second time, when whyever LOD 1 is created it works.

 

					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("My LOD").Activate(True)
					Catch
						aComp.RepresentationsManager.LevelOfDetailRepresentations.Add("My LOD")
						aComp.RepresentationsManager.LevelOfDetailRepresentations.Item("My LOD").Activate(True)
					End Try



 

Falscher Parameter. (Ausnahme von HRESULT: 0x80070057 (E_INVALIDARG))