hanks @Curtis_Waguespack , always appreciate your input.
I have a product that I would like to show various configs via a form in the main assembly. I find it works faster if I rather set ViewReps instead of LOD's.
I have a rule in the main sub assembly that works fine when that file is opened explicitly. Then the rule in the top assemblies has a line that runs the rule in the sub assembly, but nothing happens.
Rule in Sub Assy:
'define the document
Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
'define the VIEW
Dim oVIEW As DesignViewRepresentation
'define the assembly component definition
Dim oACDef As ComponentDefinition
oACDef = oDoc.ComponentDefinition
'look at parameter and set VReps
'Klappe/Standard options
Select Case Parameter("OPTIONEN")
Case ("1. STANDARD")
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("1. STANDARD").Activate
Case ("2. KLAPPE")
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("2. KLAPPE").Activate
End Select
Rule in Top Assy
'Parameter from Assembly to Sub Components
Parameter("EA2314.010000 ZBG Mäher Grundgehäuse:1", "OPTIONEN") = OPTIONEN
iLogicVb.RunRule("EA2314.010000 ZBG Mäher Grundgehäuse:1", "Konfigurationen")
'Optionen: Standard/Klappe
Select Case Parameter("OPTIONEN")
Case ("1. STANDARD")
Component.Visible("EA2314.080000 ZBG Klappe:1") = False
Case ("2. KLAPPE")
Component.Visible("EA2314.080000 ZBG Klappe:1") = True
End Select
'define the document
Dim oDoc As AssemblyDocument
oDoc = ThisDoc.Document
'define the VIEW
Dim oVIEW As DesignViewRepresentation
'define the assembly component definition
Dim oACDef As ComponentDefinition
oACDef = oDoc.ComponentDefinition
'look at parameter and toggle visibility components
'Befestigung Options
Select Case Parameter("BEFESTIGUNG")
Case "1. STARR"
'set VRep
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("1. STARR").Activate
Case "2. PRLG"
'set VRep
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("2. PRLG").Activate
Case "3. 3-PUNKT"
'set Vrep
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("3. 3-PUNKT").Activate
Case "4. A-RAHM"
'set Vrep
oVIEW = oACDef.RepresentationsManager. _
DesignViewRepresentations.Item("4. A-RAHM").Activate
End Select
It there a way to rather set the sub assy VRep from the top assy rule, instead of having a second rule? Or what is wrong that the sub assy does not adjust when its rule is run from top assy rule?
Any assistance appreciated.
Theo