I have an iLogic rule to lock top level assembly design view after running a set of rules. But before it gets locked, I want to assign View Rep to SubAssem1 first.
But my problem is, when View Rep of SubAssem1 is being updated during, this final “Locking Rule” starts to run. What happens is that it assigns the out-of-date View Rep to SubAssem1 and locks the top level assembly before the whole assembly finishes its update process.
If I disable oViewRep.Locked = True, the model is display as configured. But this “Locking Rule” messes up my final result.
Can anyone suggest what I can do to lock the view after the whole assembly is updated? Thanks.
RepName = "iLogic"
Component.InventorComponent("SubAssem1:1").SetDesignViewRepresentation(RepName,,True)
Dim oAsmCompDef As AssemblyComponentDefinition
oAsmCompDef = ThisDoc.Document.ComponentDefinition
Dim oViewRep As DesignViewRepresentation
oViewRep = oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item(RepName)
oViewRep.Locked = True