2D Parametric Blocks: Light Fixture (Part 1)

While I continue to focus on my BricsCAD Journey, I’ll try to add in a few DIY (Do It Yourself) posts for those of you that want more detail about certain topics. One of the most popular requests relates to dynamic/parametric blocks.

Dynamic vs Parametric Blocks

If you come from an AutoCAD® design environment, you may be familiar with Dynamic Blocks. You may also be familiar with 2D parametric constraints. They are two different functionalities that somewhat overlap. I won’t go into the details because it can get confusing rather quickly. Instead, I’ll focus on what you can do with BricsCAD.

If you insert AutoCAD dynamic blocks into your BricsCAD drawing, you can, in most cases, edit those block instances. You cannot, however, create or edit dynamic block definitions in BricsCAD. Instead of offering dynamic block functionality, BricsCAD focuses entirely on parametrics. It allows you to create both 2D and 3D block definitions using the same set of tools and workflow. If you’ve never worked with parametric constraints, they may sound scary. But, they’re quite intuitive and logical. And, incredibly powerful!

In this post I’ll show you how to create a simple 2D parametric light fixture. This is just one example. Any symbol that requires similar geometry at different sizes is a good candidate for parametric blocks. The possibilities are endless!

To define a parametric 2D light fixture block

If you create architectural lighting plans, you probably have a library of blocks like these:

2’ x 2’, 1’ x 1’, 2’ x 4’, 1’ x 4’

Similar light fixture blocks

Using traditional blocks, each symbol requires a separate block definition. And, if you want to change your design to use a different size, you must delete the existing block instances and insert new ones.

Defining a single parametric block to accommodate all the potential sizes, is a great solution!

Set the workspace

To ensure all the necessary tools are easily accessible, it’s helpful to set the 2D drafting workspace. For this exercise, I’ll use the Quad and other default UI elements. You can, of course, use the Command line as well.

  1. Right-click on the current workspace in the status bar.
  2. Select 2D Drafting.
  3. Start a new drawing.

Workspace control on the status bar

Draw geometry

Draw the basic geometry for the block you want to define. The exact size doesn’t matter but it’s helpful to draw it close to the scale you want. If you already have the geometry as a block, open the block as its own drawing (DWG).

  1. Right-click in the drawing area to display the Quad.
    • From the Draw tab, choose Rectangle.
      Rectangle tool on the Quad
    • Enter 0,0 for the first corner of the rectangle. This will be the insertion point of the block.
    • Enter 48
    • Press the Tab key
    • Enter 24
  2. Right-click in the drawing area to display the Quad.
    • From the Draw tab, choose Circle.
      Circle tool on the Quad
    • Pick a point inside the rectangle to place the center of the circle.
    • Enter 6 for the radius.

Rectangle and circle

Add geometric constraints to the rectangle

A rectangle is nothing more than a closed polyline. If you try to edit it, it may lose its rectangular shape. To ensure a rectangle maintains its shape, you must add geometric constraints. They establish non-numerical relationships between the various parts of geometry.

  1. From the Parametric menu, choose Fix and select the left endpoint of the bottom line of the rectangle.Geometric parameter - Fix
    Applying a Fix constraint at the insertion point of the block ensures that point will remain fixed even though geometry may move and resize around it.
  2. From the Parametric menu, choose Perpendicular and select the two lines at the lower left corner of the rectangle to ensure they always remain perpendicular to each other.
  3. From the Parametric menu, choose Parallel and select the two horizontal lines to ensure they always remain parallel to each other.
  4. From the Parametric menu, choose Parallel and select the two vertical lines to ensure they always remain parallel to each other.

Geometrically constrained entities

Add dimensional constraints to the rectangle and circle

Dimensional constraints drive the size of geometric elements and the distances or angles between them.

    1. From the Parametric menu, choose Linear and press enter to accept the default <Entity> option.
      Linear dimensional constraint tool

      • Select the left vertical line.
      • Place the dimension to the left of the rectangle.
      • Press Enter to accept the default value.
    2. Press Enter twice to repeat the previous command and <Entity> option.
      • Select the bottom horizontal line.
      • Place the dimension below the rectangle.
      • Press Enter to accept the default value.

Dimensionally constrained rectangle

  1. Press Enter to repeat the previous command.
    • Select the bottom endpoint of the left vertical line and the center of the circle.
    • Place the dimension to the left of the rectangle.
    • Press Enter to accept the default value.
  2. Press Enter to repeat the previous command.
    • Select the left endpoint of the bottom horizontal line and the center of the circle.
    • Place the dimension below the rectangle.
    • Press Enter to accept the default value.

After adding the dimensional constraints, your drawing should look like the following image. The dimension values between the circle and rectangle will vary but you’ll fix that next. You’ll also change the default names (d1, d2, d3, etc) to something more meaningful.

Default values for constrained entities

Edit dimensional constraint values

You accepted the default value for each dimensional constraint as you created it, but you could have entered different values. Either way, you can change the dimension values later. You can also enter expressions as values to create dependencies on other dimensions. In this example, you always want the circle to remain at the center of rectangle. Therefore, the distance from the lower left corner of the rectangle to the center of the circle should be half the width and length of the rectangle.

  1. Select the vertical dimension representing the width of the rectangle and, in the Properties panel, change its name to Width.
  2. Select the horizontal dimension representing the length of the rectangle and, in the Properties panel, change its name to Length.
  3. Select the vertical dimension representing the distance to the center of the circle. Change its name to CircleW and its expression to Width/2.
  4. Select the horizonal dimension representing the distance to the center of the circle. Change its name to CircleL and its expression to Length/2.

As you change the expressions for the circle dimensions, you’ll see the circle move to the center of the rectangle.

Modified names and expressions for dimensional constraints

Save the parametric drawing

To take advantage of parametric blocks, each block must be saved as its own drawing (DWG) file. And if you don’t want the constraints to show on the inserted block, you must hide them when you save the block definition (DWG).

  1. From the Parametric menu, choose Hide All Geometric Constraints.
  2. From the Parametric menu, choose Hide All Dimensional Constraints.
    Hide geometric and dimensional constraints
  3. From the File menu, choose SaveAs and enter 2D Recessed Troffer for the file name.

To insert a parametric drawing as a block

All the tools you used to define the 2D parametric drawing are available in every edition of BricsCAD including BricsCAD Classic. However, to insert the drawing as a parametric block, you must have the Platinum edition.

  1. At the Command line, enter RUNASLEVEL and choose the BricsCAD option to ensure it’s set to Platinum. If it wasn’t, you must close and relaunch BricsCAD after changing RUNASLEVEL to Platinum.
  2. Open the drawing in which you want to insert the 2D Recessed Troffer.
  3. At the Command line, enter BMINSERT and select 2D Recessed Troffer.dwg.
    • Choose the Multiple option.
    • Place several instances of the block in your current drawing.
  4. Select any of the inserted blocks and open the Properties panel.
  5. Modify the Width or Length parameters.
    Parametric Light Fixture

The current block definition enables you to enter any value for the Width or Length. That may be more flexibility than you want for some blocks. For example, you may want to limit this block to standard sizes such as 2’x4’, 2’x2’, 1’x4’ and 1’x1’. It’s easy to do using design tables. Continue with part 2 to learn how!

Heidi Hewett

As User Success Manager, Heidi brings her passion for learning to Bricsys, where she will work to help our customers understand the fastest path to success with BricsCAD products. During her 26-year tenure at Autodesk, Heidi worked as a Training Specialist, a Senior Applications Engineer and as a Technical Marketing Manager.

1 comment

Try BricsCAD 30 days for free

Subscribe to our newsletter

Want to receive the monthly newsletter in your inbox with the top content on the Bricsys Blog?