Part 2: Adding a Reference Curve Parameter
A parametric block is a type of block with special properties that, when adjusted, transform the geometry or presentation of the annotation or symbology represented. Akin to dynamic blocks in AutoCAD, parametric blocks take fewer steps to set up. The benefit of setting up parametric blocks is having one symbol that can adapt to varying displays without having to explode it to make it work.
In Part 1 of this blog, we looked at adding a stretch parameter to a section cut block. In this example, we will use the same block and add a parameter that will allow the block to automatically align with an entity underneath the cursor at insertion. This parameter is called a reference curve parameter.
Adding a reference curve parameter doesn’t necessarily require a curve to be present. The block references the object being hovered at the time of insertion and acquires a rotation angle from the object. A reference curve can be a straight line if a line is provided or can be a curve if a curve is provided while defining the parameter in Block Editor. A Curve is a bit more restrictive since the radius of the curve in the reference curve definition must match the radius of the curve the block is aligning to.
In this example, we will use a straight line.
- Open the block in Block Editor.
- Add a line drawn along the portion of the block that is to be aligned with the object.
- From the Blocks panel of the 2D Parametric ribbon tab, click the bottom half of the Blocks button to display its options. Then click Reference Curves.
- Select the line and click enter twice.
This converts this line to be parametric and moves it to a layer named REFERENCE_CURVES. This layer is locked and may be turned off or frozen to prevent it’s display.
This completes the setup of the reference curve parameter. Next, we will test it. - Close the Block Editor by making the Block Editor ribbon tab current and clicking Save Block.
- Insert the block and hover over a line or polyline that is not orthogonal. As you hover over the object, the block preview aligns. Depending on which side of the object you hover over it will also flip. Click to place the block.
If the block came in flipped from its original orientation, notice the text is plan readable. The attributes were created with the annotative property on.
Using a block with a reference curve parameter enables it to automatically orient to other linework. This allows us to place annotation in one step without having to rotate each symbol separately. Overall, parametric blocks help us to work smarter and efficiently.
– Cyndy Davenport
Give BricsCAD a try. Download the trial today.