This
example shows how to link parametric variables to the user-defined attributes of panels. You
can then use the user-defined attributes in view filters to show or hide the panels in the
model.
-
On
the Custom component editor toolbar, click the Display variables
button.
The Variables dialog box opens.
-
Click
Add to create a new parametric variable.
-
Modify the variable as follows:
-
In the Value type list, select Text.
-
In the Formula box, enter Type1.
-
In the Label in dialog box box, enter Panel1.
-
In the Custom component browser, browse for the user-defined attributes of the first panel.
You will link the P1 variable to the
USER_FIELD_1 attribute. However, the attribute is
not visible in the Custom component browser.
-
Make the user-defined attribute visible in the Custom component browser:
-
Double-click the first panel.
The panel properties open in the property pane.
-
Click More.
The dialog box for user-defined attributes opens.
-
Go to the Parameters tab.
-
Enter text in the User field 1 box.
-
Click Modify.
-
In the Custom component browser, click Refresh.
USER_FIELD_1 appears under
User-defined attributes in the Custom component browser.
-
Link
P1 to
USER_FIELD_1.
-
Right-click
USER_FIELD_1 and select Add Equation.
-
Enter
P1 after the equal sign, and then press
Enter.
-
Create two new parametric variables and link them to the user-defined attributes of the other two panels.
-
Save the custom component.
-
Close the custom component editor.
You can now
create a view filter in the model
to hide or show panels using the User field 1 attribute and
the Formula values you entered for the parametric variables in the filter.