Message 1 of 4
Error in Ilogic rule

Not applicable
02-02-2016
01:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
hope anyone can help me.
I am using iLogic to change the LOD from Main to iLogic everytime when i open the assembly.
The rule has been working without any error for 2 years till now.
Now i got the message that this rule got an error when i try to checkin this assembly.
But when i run this rule in the assembly there is no error message.
Here is the rule:
SyntaxEditor Code Snippet
Dim doc as AssemblyDocument = ThisDoc.Document If doc.ComponentDefinition.RepresentationsManager.ActiveLevelOfDetailRepresentation.LevelOfDetail <> 56072 Then 'LevelOfDetailEnum.kMasterLevelOfDetail Dim oLOD As LevelOfDetailRepresentation Dim oAsmCompDef As ComponentDefinition oAsmCompDef = doc.ComponentDefinition oLOD = oAsmCompDef.RepresentationsManager.LevelOfDetailRepresentations.Item("iLogic") oLOD.Activate(True) End If
I tried another one:
SyntaxEditor Code Snippet
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
But i got the same result.
Anyone got an idea what´s the problem now?
Thanks in advance.