Working with design tables
A design table allows you to evaluate several global parameters at once with the value of one configuration parameter, named configuration name. 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 such files with a spreadsheet software package or a text editor.
Creating a design table from a .csv file
The From file option of the DESIGNTABLE command imports .csv files that contain sets of parameter values, or else creates them from scratch. Parameters are added to the Mechanical Browser panel and to parametric component properties.
The expected format of the .csv file is:
Configuration_Name,Parameter1,Parameter2,...,ParameterN
Configuration_1,Value1Parameter1,Value1Parameter2,...,Value1ParameterN
Configuration_2,Value2Parameter1,Value2Parameter2,...,Value2ParameterN
Configuration_3,Value3Parameter1,Value3Parameter2,...,Value3ParameterN
...
The first row lists the parameter names separated by a comma. The first name must be different from the name of any global parameter in your drawing. It is called the configuration name. No spaces are allowed in the configuration name. Other names in the first row can be identical to the names of a global parameter. The next rows list possible values for these parameters as strings or numbers.
Example:
Size,Length,Width,Height
Small,300,200,100
Medium, 450,300,150
Large,600,400,200
When the .csv file is imported into BricsCAD using the DESIGNTABLE command, a special global parameter is created 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 name'. It will drive the values of other parameters in the design table. These are called 'configuration-dependent parameters'.
Direct lookup in a design table
To evaluate a configuration parameter:
- Select it in the Mechanical Browser panel 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 name, all configuration-dependent parameter values change automatically in 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 name.
Reverse lookup in a design table
You can evaluate parameters that are defined by a configuration name with a design table independently.
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 name 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 name 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.
Adding 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: the name of the configuration.
- N: 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.
Creating 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.
Use the Empty option of the DESIGNTABLE command.
You will be prompted to specify:
- The name of a new design table
- The name of the corresponding configuration name
- The names of global parameters that will be dependent on this design table
Using a parametric component with design tables
You can use both configuration name 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 available values will be available. Both direct and reverse lookup actions are supported for such parameters.
You must associate the design table with the parametric component drawing first.
- Open the drawing.
- On the Mechanical Browser panel, you will see the list of parameters and their values.
- Launch the DESIGNTABLE command and press Enter to accept the From file option.
The Select design table file dialog box appears.
- Select the .csv file, then double-click or click the Open button.
- Check the Value property for each of the main parameters. You can select the default values to use when you insert the component.
- Check the Exposed property for each of the main parameters. They should all be set to ON.
- Save the component drawing.
Other actions with design tables
The -DESIGNTABLEEDIT command allows you to:
- Delete a design table
- Replace a design table
- Link a new parameter
- Unlink an existing parameter
- Add new configurations, remove an existing one
- Export a design table as a .csv file