BricsCAD provides a rich toolset to control 2D and 3D geometric models with parameters of different kinds. This includes:
- Global parameters; parameters of 2D/3D dimensional constraints, user-defined parameters, configuration parameters of design table, etc.
- Local parameters; parameters of arrays and constrained entities inside arrays, parameters of inserts of parametric components, etc.
All parameters and their current values are displayed under different sections in the Mechanical Browser. Parameter values can be linked together via expressions. When the value of a parameter is changed, the geometric model is updated automatically. This toolset allows BricsCAD users to add parametric behavior to any geometry and easily explore design variants.
|In BricsCAD there are no parent-child dependencies between geometric elements: for example, if you change a sketch used to create an extruded 3d solid, the solid is not changed accordingly. However, you can create dependencies with parameters and expressions afterward.|
Global and local parameters
Parameters in BricsCAD can be global or local.
Local parameters are attached to a particular entity; an associative array or a mechanical component.
Global parameters are not attached to a particular entity, they are subdivided into four groups:
- Parameters of 2D dimensional constraints
- Parameters of 3D dimensional constraints
- User-defined parameters
- Configuration parameters of design tables
To learn how to create 2D dimensional constraints, see Using Dimensional Constraints.
To learn how to create 3D dimensional constraints, see 3D Constraints.
To create a user-defined parameter, see Creating a New Parameter.
To create a configuration parameter for a design table, see Creating a design table to drive Parametric Blocks parameters.
Set an expression to a parameter
You can set an expression to any parameter, global or local. The simplest expression is a number or the name of a global parameter (local parameters cannot be referenced by names in expressions). A more complex expression can also include standard operators and functions (see below).
To set an expression to a parameter: in the Mechanical Browser, click on the parameter name and fill out the Expression field:
You can also set an expression to a parameter in the command line using the -PARAMETERS command.
Defining and dependent parameters
In expressions, you can use both names of global parameters and numbers. This is known as a 'non-constant expression'. If a non-constant expression is set to a parameter, its icon changes from an open padlock () to a closed padlock (), in the Mechanical Browser:
This means that the parameter becomes dependent on other (defining) parameters (its value will be automatically recalculated when the value(s) of the defining parameter(s) is changed).
You can create a chain of parameters, where every element is dependent on the previous one. There is no limit to the length of the chain. However, you cannot create a loop where the next element in a chain drives one of the previous elements. This is because it can result in an infinite evaluation of expressions. BricsCAD automatically detects such problems and does not accept expressions that lead to a parametric loop.
Parameters of Associative Arrays
Properties of associative arrays that can be controlled with an expression:
- Rectangular arrays; Number of columns, Column spacing, Number of rows, Row spacing, Row elevation increment, Number of levels, Level spacing, and Axis angle.
- Polar arrays; Radius, Number of Items, Angle between items, Fill angle, Number of rows, Row spacing, Row elevation increment, Number of Levels, and Level spacing.
To set an expression to any of these properties, select the corresponding array entity, either in the drawing area or directly from within the Mechanical Browser and enter the expression in the corresponding properties field in the Mechanical Browser or in the Properties bar.
If an associative array contains entities constrained with 2D or 3D dimensional constraints, then parameters of these constraints can also be evaluated with expressions. These nested parameters are listed in the Mechanical Browser. If you select any of them, you can set an expression:
Parameters of Mechanical Components
The BMUPDATEMODE system variable controls whether external assembly components are always reloaded or only when modified.
If you insert a mechanical component or just a plain .dwg file into a drawing with BMINSERT command and the insert contains global exposed parameters, these parameters convert to local parameters. They are associated with the corresponding component insert and are visible in the Mechanical Browser under the name of this insert. Click the parameter(s) to edit:
A design table allows BricsCAD users to evaluate several global parameters at once with the value of one configuration parameter. You can create design tables from scratch in BricsCAD or import them from a .csv file (a comma-separated values text file). You can create this with a spreadsheet software package or a text editor.
Creating a Design Table from a .csv file
The expected format of the .csv file is:
Configuration_Name,Parameter1, Parameter2, ... , ParameterN
The first row lists the parameter names separated by a comma. The first name should not coincide with the name of any global parameter persistent in your drawing. It is called the configuration name. No spaces are allowed in the configuration name. Other names in the first row can (and usually do) coincide with the names of global parameters in a drawing. The next rows list possible values for these parameters as strings or numbers.
Use the DesignTable command to import a .csv file into BricsCAD. This creates a special global parameter by the name of the first name in the first row of the .csv file ('Size' in the above example). This is called the 'configuration parameter'. It will drive the values of other parameters in the design table. These are called 'configuration-dependent parameters'.
BricsCAD does not maintain an association with the .csv file, used to create a design table: if this file is modified then the design table is not updated automatically. Use the -DESIGNTABLEEDIT command to replace a design table with a new or modified .csv file.
Direct Lookup in a Design Table
To evaluate a configuration parameter:
- Select it in the Mechanical Browser and type the desired value in its Expression field.
- Select a value in the drop-down list of the Value field:
If you change the value of a configuration parameter all configuration-dependent parameters' values change automatically on the corresponding design table. The values of these parameters are taken from the row in the design table. The first element coincides with the current value of the configuration parameter.
Reverse Lookup in a Design Table
You can evaluate parameters, that are defined by a configuration parameter with a design table independently. To do so, select the dependent parameter and apply an expression to it. If the value of this expression matches one of the values in the corresponding design table, then the configuration parameter and all dependent parameters of the design table will automatically change to the values specified in the corresponding row in the table. If several configurations are possible for a particular value of a dependent parameter, BricsCAD selects the one closest to the current values of the other parameters.
If you enter an expression and the result is not available in the design table or if you enter expressions for two or more design table parameters and the values cannot be found in a single configuration (the values are not found in the same row in the design table), then the values of the configuration parameter are changed to 'Custom' and the values of the other dependent parameters are not changed. This case corresponds to a configuration that does not exist in the design table.
Add a New Configuration to a Design Table
You can add any 'Custom' configuration to a design table and assign it a name. To do so, right-click the configuration parameter in the Mechanical Browser and select Save current configuration in the context menu. The configuration will be added to the design tables as 'Configuration_N' ('Configuration' is the name of the configuration parameter and 'N' is an index number - one more than the current number of configurations in the design table).
If you want to save a configuration in the design table under a different name, launch the -DesignTableEdit command.
Create an Empty Design Table
If you use the procedure described above, it is possible to start your design with an empty design table and then fill it with the desired values.
To do so, use the 'Empty Design Table' tool. You will be asked:
- The name of a new design table (also the name of the corresponding configuration parameter),
- The names of global parameters that will be dependant on this design table.
Use a Parametric Component with Design Tables
You can use both configuration parameters and configuration-dependent parameters in assemblies. If you then insert such a component into your drawing, its parameters will include the exposed parameters of design tables. A drop-down list of admissible values will be available. Both direct and reverse lookup actions are supported for such parameters.
Other Actions with Design Tables
The -DESIGNTABLEEDIT command gives the options to:
- Delete a design table.
- Replace a design table.
- Link a new parameter to the design table or unlink an existing one.
- Add new configurations, remove an existing one or export a design table into a .csv file.