Parametric blocks change shape or content per reference: a desk that stretches to any width, a door that flips, a symbol with named views. This article is for users who build reusable smart blocks.
Before you start
- Any paid licence. A block defined with
-BLOCK. - The commands are on Insert > Parameters:
-BPARAMETER,-BACTION,-BVISIBILITYand-BPARAMVALUE. Each command is one undo step.
Parameters and actions
| Parameter | What it holds | Actions |
|---|---|---|
| Linear | A distance along a direction, for example a width | Stretch, Move, Scale, Array |
| Angular | An angle about a centre | Rotate |
| XY | Two distances along the block's axes | Stretch, Move, Array |
| Polar | A distance and a direction | Stretch, Move, Rotate, Scale, Array |
| Flip | A reflection line | Flip (mirrors its objects) |
| Visibility | Named states, each showing some of the objects | (choose objects per state) |
| Lookup | Named rows that set several parameters at once | (none) |
Steps: make a stretchy desk
- Click Insert > Parameters > -BPARAMETER. At "Select a block reference or enter a block name" pick a reference of
DESK(points are read through its placement) or type the name (points relative to the base point). - At "Enter an option [Linear/Angular/Visibility/LOokup/XY/POlar/Flip/Delete/List] <List>" type
L. - Type the parameter name
Width, click the base point of the distance, then the end point (direction and default distance). - At "Limit the values? [Minimum/MAximum/Values/Increment/Done] <Done>" set Minimum 1200, MAximum 1800 and Increment 100, then Done.
- Click -BACTION, pick the reference, type
Width, choose Stretch at "Enter action [Stretch/Move/Scale/Array] <Stretch>", and give two corners: objects crossing the frame are acted on, and for Stretch the frame decides which points move. - Set a reference's width with -BPARAMVALUE (select references, choose the parameter, type the value), in the Properties panel, or by dragging the parameter's grip.
Visibility and lookup
- Visibility: in
-BPARAMETERchoose Visibility, name it, and give "state names, separated by commas (the first is the default)". Then run-BVISIBILITY, choose the parameter and a state, choose Set, Add or Remove at "Objects the state shows [Set/Add/Remove] <Set>", and give two corners round the objects. - Lookup: choose LOokup, name it, then enter rows such as
Small: Width=900, Lamp=Off(Enter ends).
Setting values
| Kind | How you type it |
|---|---|
| Linear, angular | A number; angles in degrees |
| XY | x,y |
| Polar | distance<angle (degrees) |
| Flip | Flipped or Not flipped |
| Visibility, lookup | A state or row name |
Values outside the minimum and maximum, not in the allowed list, or off the increment are refused with the reason.
Grips
A selected reference shows grips for its parameters: at the end of a linear distance, on an angular parameter's angle, at an XY corner or polar end, and a flip grip. Drag one, or click it and then where it goes; values stay within their limits and snap to allowed values and increments. Visibility and lookup parameters have list grips past the top right corner of the block: click one and choose from the options the command line lists. Each grip edit is one undo step.
Arrays and chains
- An Array action asks for its spacing (for XY, between columns and between rows). Its objects repeat at every spacing up to the distance, at most 1000 in each direction.
-BCHAINmakes an action carry later parameters with it: a stretch that widens a door can carry the door's swing parameter, so the swing turns about where the hinge now is.
Tips and common mistakes
- Each reference keeps its own values; the block's objects as drawn are the default state.
EXPLODEgives the reference's current shape.- The block editor keeps the parameters when you save; redefining the block with
-BLOCKremoves them. - Parametric blocks from DXF files come in as the shape they were saved with, without their parameters.
REFEDITcannot edit a reference with its own parameter values; use the block editor.
Troubleshooting
| Message or symptom | What it means and what to do |
|---|---|
| A value is refused with a reason | It is outside the limits or not an allowed value; check the limits with -BPARAMETER List. |
| An action moves the wrong objects | Run -BACTION again with a frame that crosses only the objects and points that should move. |
Related
Related
- Fitting an object into a space
- Grid, snap, ortho and polar tracking
- Object snaps and object snap tracking
- Entering exact points, distances and angles
- Constraint hints while drawing
- Drawing lines
Still stuck? Open a support ticket or use Help, then Contact support in Stratal CAD.