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 

 

Ok, I am still trying to understand your point and what you are trying to achieve, Inventor generates an LOD, when we suppress the part, but it is not added in LOD list until the assembly is saved, and we can not get that from LOD collection, I agree there.

 

I have found a workaround where you can see if there is any unsaved LOD exist, It is not reliable but may be able to serve your purpose, Whenever any part is suppressed in Inventor it by default creates a LOD, and the name is always containing "LevelofDetail", and the same is reflected at the top in assembly name. What I did in below code as a starter is to see if the assembly display name contains the word "LevelofDetail" if it does that means there is an unsaved LOD. See the below code, it will also show the name of the unsaved LOD in the messagebox.

 

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

Dim LOD As LevelOfDetailRepresentation = asDoc.ComponentDefinition.RepresentationsManager.ActiveLevelOfDetailRepresentation
Dim Str As String

'MessageBox.Show(asDoc.DisplayName)

If asDoc.DisplayName.Contains("LevelofDetail")
	MessageBox.Show("There is an active unsaved LOD",LOD.Name)
	
	
End If

 

Hope this will be a small help in your goal. Kindly reply here and we can try to solve your problem in more detail.

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn