Quick links:
In most CAD programs, blocks are used as named groups of geometric objects that represent a single 2D or 3D entity. They are helpful to repeat content, such as symbols, common building components, and other details.
While most CAD users are familiar with Dynamic Blocks in AutoCAD®, this article explores Parametric Blocks in BricsCAD. See how to create and modify them, learn the benefits, and find out how they are quite different than Dynamic Blocks in AutoCAD. Discover why BricsCAD Parametric Blocks are the most flexible CAD blocks that you can use.
What are Parametric Blocks?
Parametric blocks are blocks which contain not only pure geometry, but also some metadata. This metadata effects the geometry of the block - for example the size, or dimension of the geometry - and its visibility. All versions of BricsCAD (Lite, Pro, & Ultimate) include the tools need to create custom Parametric Blocks.
The metadata controls the way the components of the block behave. What this means, is that the size and appearance of a parametric block can be modified without editing the block definition itself.
How to Create Parametric Blocks?
Working in a drafting workspace - the geometry for this example, contains the entities representing three distinct configurations of a door. These configurations are considered the different visibility states.
First, add visibility states to the door. From the ribbon, go to the parametric tab, and to the far-right, and find the parametric blocks panel.
Select the visibility states panel. There are currently no visibility parameters defined - and no states present, because there are no parameters currently defined.
To create a new visibility parameter, select the blue circle with a “plus in it” at the bottom right of the panel. It gives the visibility state parameter a default name. In this example, it is named “SWING.”
Define the different states, or visibility options, by first selecting ADD STATE. Next, name the state for the open door – in this example, it is named OPEN.
Next to OPEN property, when you hover over the panel, there are three dots representing a dropdown menu. Open the menus and choose the option to “make entities visible.”
Next select the full 90-degree Open Arc, and the vertical line of the door. Together these represent the full open door.
Those are the entities that you want to appear when the “OPEN - visibility state” is chosen.
Create another visibility state for when the door is half open, so select the ADD STATE again. This time, name it HALF OPEN.
Next, select make entities visible and select the 45-degree arc - representing a half-open door, and select enter, to complete the selection.
Finally, there is one more state to add - and that's for a CLOSED DOOR. So, repeat the same steps as before and create a visibility state for a CLOSED DOOR. This time do not select any geometry in the CAD blocks because the rectangular door panel should show up in ALL states. Once finished with editing the block, be sure to save it with a different name.
This block can be now stored in the block library. There is a library that comes with every license of BricsCAD. You can customize as you wish and add components to it - like this door.
Notice, there is a category in the Block Library for 3D doors, but currently there is not a category for any 2D Doors. So, the 2D Doors folder needs to be created.
To do this, go to the panels, on the right, and go to the library panel, and open it.
Open the library and select the blue button, with the plus on it, in the bottom right-hand corner. When a new object is added to the library, it will also create a new folder for it at the same time.
When the dialog appears, select the entire drawing. As a good practice, give it the same name as when it was first saved to keep things organized.
Once created, you can either create or choose a category. Notice that when you start typing in door, BricsCAD is trying to match it to one of the pre-existing categories.
To override this, pick outside of that list, and continue to edit, and call it Door 2D.
This folder doesn't already exist, so it will be created on the fly. Generally, you do want it to create it in the same components folder as the remaining library components - so select the create button. The new folder now appears in the block library.
It is often a good idea to go to the menu at the top of the library panel and select the generate thumbnails command. This helps make sure that it has created a representation of this new door - in that door 2D folder.
Now when you open the Door 2D category, you should see the door visibility file. Now, you can select this door visibility block, and place it in the drawing.
See how much you can save by switching from AutoCAD to BricsCAD [ calculator ]
Adding Reference Curves to Parametric Blocks
Presently, an insertion point is not specified to help position the new block in the drawing. So, it must be given a scale factor for XY, and rotation, to place the block. Ultimately, this is the not the best workflow, so the saved version in the library needs to be edited.
Reference curves need to be added to this block, so it can more easily be inserted into the linework of the walls with this floorplan.
Go back to the parametric tab, go to the parametric blocks tab, and pick the reference curves tool. Next, select the four horizontal lines that represent the wall in the block. Notice that the lines has changed color.
Going to the layers panel, there is a new layer called reference curves. Be sure and save this new block definition. Remember to refresh the thumbnails because it doesn't automatically do it for us.
Notice that the new version, door visibility block appears with a circle including a FX symbol on it, meaning that it is parametric.
It doesn't specify what per perimetric functions it has, but it does identify is as a parametric block.
Going back to the floor plan, select the door visibility block. When it is moved into the drawing, notice that instead of showing the white lines, it's showing guide curves like those seen with the BricsCAD Copy Guided and Move Guided tools.
When the block is moved over the walls on the interior the building, it's not matching the width – but, when moved over the exterior walls, it does.
Further Modifying Behavior of Parametric Blocks
This is where the power of BricsCAD’s parametric properties becomes evident. The door block can be further modified so that once it is placed, you can change actions like which side the door is swinging from or whether it is swinging inside or outside of the building.
Right now, only the swing option is available, which allows you to change it to half-open, or closed. We now want to add flip lines to this block.
Open the block file again. Go to the parametric tab on the ribbon -- parametric blocks – flip line. Now, to create two flip lines. The first one will be a flip line, representing the hinge side of the door.
Snap to the midpoint of this door panel, and then draw a line vertically – holding the shift key to ensure that it is perfectly vertical. When prompted, name the flip line. In this example, it is called hinge side.
To confirm the new flip line, go to the layers panel, we can see that there's a new flip line layer and when we turn the display off, that green line goes off.
BricsCAD automatically categorizes items, when using these tools, and create the layers needed for them. Now, it’s time to create the other flip line.
Following the same steps as before, create a horizontal line. In this case, this second flip line is called wall side. Now, there are two flip lines, so the block can flip in two different directions. As before, don’t forget to generate thumbnails again, back in the Library Panel.
Place this block again in the drawing and see how it snaps to the outside walls. Also, if you go to its properties, it has two new parameters called hinge side and flip side. So now, you can switch it, by just changing it from not-flip, to flip.
Adding Stretch Geometry to the Block
To get even more functionality, you can add the ability to stretch some of the geometry. The stretch parameter works like the stretch command. It can be useful when there are many entities to be stretched or moved in the same direction, over the same distance, without editing the block.
In this case, the stretch parameter can replace several constraints, to help simplify the drawing and the process of parameterizing the geometry.
Zoom into the door panel in the latest save block DWG, and go back to the parametric tab, on the ribbon -- select parametric blocks, and this time, we will select stretch.
The Stretch Command asks to define a base point of displacement, and a second point which defines the direction. Then BricsCAD asks (In the command line) to construct a stretch frame - a rectangle, that will go around the geometry, to be edited.
Place the box representing the stretch frame, around the geometry -- effectively defining what it wants to grab, and stretch, with this box.
For this example, the stretch frame is named thickness. Going to layers panel again, you can now see that there is a parametric stretch layer.
Back in the floor plan file, if you place the block, you can see the line that represents the stretch vector.
If you go to its properties, and go down to parameters, you can see a new thickness parameter. From here, you can enter a new value into the properties field to change the thickness of the door panel.
Create Flexible Guide Curves with Auto-constraints
The last thing to do is it give the guide curves a flexible attribute to snap into walls of varying thicknesses. There is new parametric feature, that allows us to add what's called a fuzzy, or flexible nature, to the reference curves.
Go back to the parametric tab, on the ribbon, and to the parametric blocks panel, and pick reference curves again. Then, at the command line, hit P, for parameterize.
Next, use the coincident geometric constraint, and selected the A for Auto-constrain option from the command line.
From there, pick a window around the intersection of bottom-left horizontal reference curve and the vertical line representing the door opening. Doing this automatically applies a coincident constraint to those lines. Do the same thing for the other three corners of the guide curves.
Once done, there is now coincident relationships between the horizontal and the vertical lines of the door opening. In the properties, if you go to the parameter and constraints dialogue, we can see that there's some new constraints for offset and angle.
Right-clicking on one of these offsets, and select animate, you can see that the reference curve, and the end point of the door open move together.
Cleaning Up the Block
To clean up the appearance of the block, freeze the flip lines, freeze the parametric stretch, freeze the reference curves, and go ahead and hide the geometric constraints.
Now if you grab the latest saved block, and bring it into the floorplan drawing, Notice, that it will snap to the outside walls, and now, it also snaps to the inside walls as well.
And, the flip, and the stretch parameters can still be adjusted too.
The result is a block for a door that is very parametric and has a lot of functionality.
Conclusion
There is a lot of functionality available with Parametric Blocks in BricsCAD. You can create different visibility states and add them to your Block Library. From there, you can add guide curves and constraints, so they snap into the geometry of your floorplans.
However, you don’t need to start from scratch. BricsCAD is fully compatible with AutoCAD block libraries, and block references with AutoCAD blocks, including any Dynamic Blocks. In fact, you can migrate all those existing AutoCAD customizations into BricsCAD.
Interested in learning more? The best way to get started is to download the free 30-day trial of BricsCAD and test it for yourself. Try it and you’ll quickly become a fan of BricsCAD.
What CAD Software is your choice for creating and editing blocks? Leave your answer in the comments.