|
This task explains how to activate and
deactivate a component. In the scenario described below, the CATProduct
file contains two CATPart files that you will activate and deactivate
alternatively after creating user parameters and a rule based on these
parameters. |
|
Note that:
- Relations located at the product level are not integrated to the
product update. If your relation drives the parameters of a Part, create
the relation at the Part level.
- Parameters driven by rules are designed to enable you to
control components activities at assembly level.
|
|
When working in a Japanese environment,
remember to check the Surrounded by the Symbol' option (Tools>Options>General>Parameters
and Measure>Knowledge tab). |
|
-
Open the
KwrSyringe.CATProduct file and save the following files in the same
directory (SyringePiston.CATPart,
HollowSyringePiston.CATPart, and
SyringeContainer.CATPart): This file contains a syringe made up of
three different parts: A barrel, and two different plungers.
-
Create a multiple value parameter of string type.
- Click the
icon. The Formulas Editor opens.
|
- Select String from the scrolling list with Multiple Values. Click
New Parameter of type. The Value List dialog
box opens.
|
- Enter two different values, Hollow and Full, and click OK.
|
- Edit the name of the new parameter (SyringeType in this scenario)
in the Edit Name or value of the current parameter and
click OK. The new parameter is displayed under the
Parameters node of the Specification tree.
|
-
Access the Knowledge Advisor workbench and click the Rule
icon to create a rule. The script of this rule will allow you to enable
or disable one of the plungers.
-
Enter the code below in the Rule Editor, and click
OK.
if (SyringeType == "Hollow")
{
`S3\Component Activation State` = false
`S2\Component Activation State` = true
}
else
{
`S2\Component Activation State` = false
`S3\Component Activation State` = true
} |
|