I'm trying to write a method that will collect the dynamic paramters of one child and pass them into another. I have the method below that will do it however the SalesadditionalParameters rule doesen't unbind to update the SalesConfigurator child. Any one have any suggestions. Thanks
Parameter Rule TestDesignName As Name = : IvCone
Method GetadditionalParameters (PartToTest As Part) As List
Dim Tmp As List = {}
Dim DynRulesList As List = GetDynamicRules(PartToTest)
Dim DynRulesPList As List = {}
Dim DynRule As Name
For Each DynRule In DynRulesList
DynRulesPList = DynRulesPList + {DynRule, ref(PartToTest, DynRule)}
Next
Tmp = Tmp + DynRulesPList
Return Tmp
End Method
Rule SalesadditionalParameters As List = GetadditionalParameters(DesignConfigurator)
Child DesignConfigurator As TestDesignName
origin = origin
grounded? = False
ignorePosition? = False
DesignConfigurator? = True
End Child
Child SalesConfigurator As TestDesignName
origin = DesignConfigurator.Origin + Vector(10, 0, 0)
grounded? = False
ignorePosition? = False
DesignConfigurator? = False
additionalParameters = SalesadditionalParameters
End Child
Hi
Your method will not create a dependency, it can’t since it only determines the dependency on the fly based not on rule values but on the function that assesses if the rule has a dynamic value (this last point is the problem).
One thing you could do is intentionally make the salesadditionalparameters rule depend on the designconfigurator.modelself (assuming that the parameter changes will cause that to be unbound).