Thank you so much for your help.
I had to adapt the code, here's what I've got:
'record the active view rep name
Dim sActiveViewRep As String
sActiveViewRep = oAsmCompDef.RepresentationsManager.ActiveDesignViewRepresentation.Name
'Lock the View Reps
For Each oViewRep In oAsmCompDef.RepresentationsManager.DesignViewRepresentations
'skip the master view rep
If oViewRep.DesignViewType = DesignViewTypeEnum.kMasterDesignViewType Then 'do nothing
'skip any private view reps
ElseIf oViewRep.DesignViewType = DesignViewTypeEnum.kPrivateDesignViewType Then 'do nothing
ElseIf oViewRep.Name = sActiveViewRep Then
Else
'Lock the View Rep
If oViewRep.Locked = False Then
oViewRep.Locked = True
End If
End If
Next
oViewRep = oAsmCompDef.RepresentationsManager.DesignViewRepresentations.Item(sActiveViewRep)
oViewRep.Locked = False
So, when I switch to the View Representation I want, the iLogic locks all of them leaving the active unlocked.
The only problem is that prior to the switch, I had the view to a certain part face in front (parallel to the screen), after switching back, the view is oriented to the Left. I have no clue why it's behaving like that. Do you know?