Setting the Level of Detail with iLogic
iLogic requires a custom Level of Detail (LoD) before it can perform an operation that suppresses a component. If a custom LoD is not active or one does not exist you will get an error message. I get a lot of enquires about this dialog box and how one can avoid the hassle.
First create a rule called “LoD” and populate with the following code:
Dim doc as AssemblyDocument = ThisDoc.Document Dim oLOD As LevelOfDetailRepresentation Dim oAsmCompDef As ComponentDefinition oAsmCompDef = doc.ComponentDefinition Try oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True) Catch Dim nLOD As LevelOfDetailRepresentation nLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Add("iLogic") oLOD = nLOD Finally oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic").Activate(True) End Try