In my last BricsCAD post, I led you through the steps to define a parametric block for a light fixture. With that single block definition, you can easily change the light fixture symbol to virtually any size. While that kind of flexibility can be extremely useful for some blocks, others, including the light fixture, are more valuable if they’re limited to realistic or standard sizes. After you define your parametric block and ensure it behaves as expected, you can create a design table to drive the relevant block parameters. The light fixture includes four-dimensional constraints but only two are relevant for changing the size of the fixture: Width and Length. In this post, you’ll update your parametric light fixture block to use a design table with standard sizes for the width and length.
Create a design table
First, you must create the design table as a CSV (comma separated) file. You can use a spreadsheet app or a simple text editor. Below are the steps to use Wordpad, but you can use any app that allows you to save it as plain text with a .CSV extension.
- Open WordPad.
- Enter the parameter names in the top row, separated by commas. I added a parameter called “Size”. It represents the names of the different variations. For example, I might call them Small, Medium, Large, and XLarge. But, I named them according to their size in feet, as is common here in the United States. The Width and Length refer to the dimension constraints that will drive the size (in inches).
- Add the sizes you want to include with their corresponding Width and Length values. I’ve only added four sizes, but you can have a long list with any number of size combinations. The image below shows what it looks like in Excel (left) and in WordPad (right).
- Save the file as CSV format. It’s plain text separated by commas with a .CSV file extension.
Add the design table to the parametric block
Next, you must associate the design table with the parametric block drawing.
- In BricsCAD, open 2D Recessed Troffer.dwg. This is the block definition drawing, not a drawing with the block inserted.
- Right-click on any UI element and turn on the Mechanical Browser panel. In the Mechanical Browse, you will see the list of parameters and their values.
- At the Command line, enter DESIGNTABLE and press enter to accept the default option <From file>
- Select the .csv file you created. Notice the Size parameter is added to the Mechanical Browser with the Width and Length parameters grouped under it.
- Check the Value property for each of the main parameters: Size, Width, and Length. You can select the default values to use when you insert the block. For example, if you most often use 2’x4’ fixtures in your designs, set that size as the default. The corresponding Width and Length values will follow.
- Check the Exposed property for each of the main parameters: Size, Width, and Length. They should all be set to Auto. I’ll explain these settings after we insert the block into a drawing.
- Save the block drawing.
Modify the parametric block instance
Then, you can insert the parametric block into a drawing and test it out1
- Open the drawing in which you want to insert the light fixture. If a block definition of the same name already exists in the current drawing, you may have to rename or erase/purge the old definition.
- At the Command line, enter BMINSERT and select 2D Recessed Troffer.dwg to insert it as a block in your current drawing.
- Select the inserted block.
- In the Properties panel, select a different size under the Parameters pane. Now you can only select from the sized in the design table. This helps ensure accuracy and compliance with standards.
When you add the design table to the block, the Exposed property for all three parameters is set to Auto by default. In our example, that means the Size is exposed for modifying the block insertion in the Properties panel but the dependent parameters, Width and Length, are not. You can explicitly set the Exposed property in the block definition to On or Off depending which parameters you want available for modifying the block insertion. Here are a few examples.
I hope you found this DIY useful. The 2D light fixture is just a small example of what you can do with BricsCAD parametrics. Parametric functionality is fully supported in both 2D and 3D and the possibilities are endless!
If you’d like the files and instructions for the 2D Parametric light fixture, you can download them from Bricsys 24/7.