Design and Manufacturing solutions through Digital Prototyping and Interoperability

Tag Archives: AutoCAD

AutoCAD Deep Dive Series: Dynamic Blocks Part 3

As we’ve seen in previous posts, Dynamic Blocks open a whole new world of building smart, configurable, and flexible blocks. In a previous life I was involved with a company that reduced their block library from over 10,000 items to just below 500. You might be thinking “Whatever Mike”, but this was a company that designed the electrical portion of commercial buildings. They didn’t really have that many types of blocks, just 100’s of iterations of the same item, slightly adjusted based on size, options, or manufacturer. Pulling all this data into one configurable item is where the savings occurred.

If you haven’t checked out dynamic blocks, read these first… Dynamic Blocks Part 1 and Part 2

In this final mini-deep dive on Dynamic Blocks lets explore visibility, how you can manage what is shown and what isn’t shown in the various versions of the block.

First start with the objects. You really have two options: Create all the objects up front or create the objects as they are required. In this example I’ve created a line and two circles and I’m going to create two versions…. one with the circles on and another with the circles off.

Dynamic Block Visibility - Start

Add a Visibility Parameter.

Dynamic Block Visibility - Add Parameter

The location of the parameter sets the location of the visibility grip. It also enables the Visibility Controls in the ribbon.

Dynamic Block Visibility - Visibility Panel

  1. Launch the Visibility States dialog
  2. Visibility Mode – Toggles between seeing invisible objects and not seeing them
  3. Make Visible / Make Invisible – Select objects to make visible or make invisible
  4. Active Visibility State

From within the Visibility State dialog rename the active state something more meaningful. Remember this is what the user will see when they select the visibility state to use.

Dynamic Block Visibility - Rename Vis State

When creating a new state, three options are presented to deal with the existing geometry: Turn all on, Turn all off, or leave as is. The option to use really depends on the existing geometry and what you need to do with the geometry visibility.

In this case I use “Leave visibility of existing objects unchanged in new state” leaving what is visible on and what is currently invisible toggled off.

Dynamic Block Visibility - Create New Vis State

I use the Make Invisible to turn off the two circles. By using Visibility Mode I toggle the invisible geometry to appear ghosted so that they can still be selected and included in other actions I include in the block. To test the functionality use the Visibility States drop-down to switch back and forth between the states.

Dynamic Block Visibility - Visibility States

See it in action here…

Feature Image Universal Invisible Woman by JD Hancock

The One AutoCAD Feature You Need to Be Using Now!

Dynamic Input has been in AutoCAD for a long time. What I’ve found in my many journeys is that not everyone is using it or not using it efficiently…. why not? You should be. To me its one of the greatest enhancements to 2D drafting within AutoCAD in the past 10-years. If you’re not currently using it, here’s your opportunity to try it, not just kinda try it, but really try it. Make it work for you.

Dynamic Input is a Heads-Up Display (HUD) type mechanism that moves your focus from the command line to your cursor. All the action is happening at the cursor anyways, why not be a part of the dance instead of hanging out along the wall waiting for someone to ask you to dance? It prevents the bad tennis match that occurs… eyes to the drawing area, eyes to the command line, eyes to the drawing area, eyes to the command line, repeat, repeat, and repeat.

In the image below the line on the left is being created with Dynamic Input. Notice the onscreen command prompting (“Specify next point…”) and the visible dimensions. The line on the right is being created without Dynamic Input.

Dynamic Input vs. No Dynamic Input

There are many aspects of Dynamic Input

  1. Command Prompting on the screen (Echoed to the command line)
  2. Coordinate Display at the Cursor
  3. Geometry Dimensions, on screen, adjustable, used to define the size of your objects

With Dynamic Input you don’t need to worry about proceeding your inputs with @, # or any other special character. You do not need to worry about your angles being measured clockwise or counterclockwise… why? You’ll see the values on the screen. Another bonus to using Dynamic Input is that you can set the default to Relative or Absolute. So if you are always working in Relative why be forced to proceed the dimensional inputs with an @

The key to using Dynamic Input is the Tab key. If you want to adjust the length of the line and the angle, enter in the value for the length of the line but press Tab, not Enter. Tab will bounce between the input boxes and you only press enter when satisfied with the inputs.

Like Object Snaps, Object Snap Tracking, Polar, Ortho, and all other Drafting Aids, it can be enabled and disabled. Use it when its needed it, disable it for the rare occasions it becomes annoying or gets in the way.

AutoCAD Toggle for Dynamic Input

If Dynamic Input does not appear in your status bar with the other drafting aids you probably just need to turn it on…

Adding Dynamic Input to the UI

Dynamic Input is configurable. You can adjust what appears on screen and what doesn’t. You can set the default to absolute or relative. You can adjust colours, transparency, and size. To access the config dialog right-click on the icon in the status bar and select Dynamic Input Settings… On the main part of the dialog you can enable or disable Pointer Input (on screen coordinates), Dimension Input (the on screen dimensions that appear when creating geometry), and whether you want the on screen command prompting.

ACAD - DynInput - DraftingSettings

Drafting Tooltip Appearance launches a dialog to manage the size, colour, and transparency of your Dynamic Input.

ACAD - DynInput - Tooltip Appearance

Use Pointer Input Settings to manage the display of coordinates with the Dynamic Input… when do they appear and in what format. My favorite part of this dialog? The option to set the default to Relative Coordinates!ACAD - DynInput - Pointer Input Settings

In Conclusion… if you aren’t using Dynamic Input you are missing out. Here’s a video of Dynamic Input in action.

AutoCAD Deep Dive Series: Dynamic Blocks Part 2

In the first part of our deep dive on dynamic blocks we explored the benefits of dynamic blocks, how they are created, and how to use parametrics to drive the dynamic block configurations. In this post lets look at an alternative to parametrics… parameters and actionsParameters and Actions actually came first. Before AutoCAD had parametrics, this was the only way to create dynamic blocks. Using Parameters & Actions has pros and cons and when to use this over parametrics is really based on the situation, the geometry, and the desired results.

1963 Oldsmobile Dynamic 88 Fiesta Station Wagon

1963 Oldsmobile Dynamic 88 Fiesta Station Wagon by Alden Jewell

Lets use the Wet Bar block included with the AutoCAD samples. I want the ability to size the width and depth of the block. I want the option to move the bottles and glasses around on the surface. To finish the block I want the option to rotate the faucet on the sink

Wet Bar Block

Think of Parameters as the nouns, defining the subject of the change. The Actions are the verbs, defining what’s actually going to happen. Parameter Sets are just the combination of specific parameters and actions. “Canned” shortcuts to simplify the process.

To apply parameters and actions you’ll need the Block Authoring Palette. If its not currently visible select the Authoring Palettes button in the ribbon > Manage panel

Block Authoring Palette

To set up the block to allow the stretching of the width and depth we require two Linear Parameters. The act of applying the Linear parameter is similar to adding a linear dimension… pick two points and then the location for the parameter. Order here is important, but only if you want one grip to appear opposed to both ends.

With the Wet Bar I want the grips to modify the size of the block in the upper right-corner. When creating the horizontal parameter I pick the left side first, then the right side. With the vertical constraint I pick the bottom first then the top point. The results look similar to this

 Dynamic Blocks Linear Parameters

Don’t be concerned about the yellow exclamation marks at this point as these are warnings that there are no actions associated with the parameters yet. To see this just roll your cursor over one of the yellow symbols.

If we try the block at this point the grips so not appear, however, before we assign the actions lets explore the parameters properties.

The name Distance1, Distance2 really doesn’t mean much…. plus if we end up with multiple Linear Parameters it will get confusing on what each one is controlling. Using the Properties Palette I’ve adjusted the Distance name to be Bar_Width and Bar_Depth. I’ve also appended Distance descriptions to help explain the parameters purpose incase I am not always the one making changes. As a bonus the description will appear as a tooltip for anyone using this block.

Linear Parameter Properties
Linear Parameter Properties

In the Misc section of the properties are options to tweak the Base location, Property Display, Chaining Actions, and the Number of Grips. Base location in this instance will remain Startpoint, but the Midpoint option is good when you want to make symmetrical type adjustments. With Show Properties set to Yes the Parameter will appear in the Property Palette when the block is selected meaning you can adjust the size of the parameter from the property palette. Finally I’m going to adjust the Number of Grips from 2 to 1 as I only want the user to adjust the size of the block from one end

Using the Value Set section I will apply an increment restriction so that the Width can only be adjust in 2-unit increments. The minimum will be 36 (the current width) and although optional I will set the max at 72. With the Depth I will configure a List with the options for 26, 32, 48. and 62.

Linear Parameter Properties

Now that we’ve decided how we want it to change lets actually make it do something. Switching to the Actions tab on the Authoring Palette I see many options, but in this case I want to apply Stretch. This highlights one of the advantages of parameters / actions over parametrics, I do not need to worry about constraining and dimensioning each and every object involved in the action, a simple crossing window will take care of it.

The process…

  • Start Stretch
  • Select the Parameter to apply the action
  • Select the grip to apply the action.
  • Define the Stretch Frame Window
  • Select the objects to be affected by the stretch

The Stretch Frame does not define the objects to be stretched but the parameter and grips that are required for the stretching action. It can be selected as a window or crossing. As this is a stretch action any object you want stretched and not moved needs to be selected by a crossing window.

Applying Stretch Action

After applying the stretch to both parameters we’re ready for testing. I do not need to apply the stretch action to both ends of the parameter as I already reduced the number of grips to 1 and I only want the user to adjust it in one direction.

What about Actions and their properties?

Stretch Action Properties

The Action Name is a good idea to change, especially as you could end up with many actions in the dynamic block and without proper names it may be difficult to determine the one to modify. The Selection Set is a method to alter the objects included in the action, both add and remove. The Distance multiplier and Angle Offset do as they describe, override the amount the action applies to the selected objects.

So we have a Width and a Depth but we don’t really want this wide open for any combination of sizes… say the Wet Bar is only available in a select few size configurations, so we should only provide these to the user. The Process to take:

  • Adjust the number of grips on the Linear parameters to 0 (we don’t want the user of the block to grip edit the size)
  • Adjust the Show Properties value on the Linear parameters to No (we don’t want the user selecting whichever size they want)
  • Add a Lookup Parameter (sets the location of the grip)
  • Add a Lookup Action to the Parameter and define the size configurations

ACAD Lookup Parameter

Dynamic Block Property Lookup Table

The way the Property Lookup Table works is the parameters you wish to control are added (via Add Properties) to the left side of the dialog. The size combinations are set here. On the Right side the name of the configurations are set. This is text which can be whatever you want. The result is something like this….

Dynamic Block with Lookup


AutoCAD Deep Dive Series: Dynamic Blocks Part 1

Within AutoCAD there are actually two types of blocks… good old static blocks & dynamic blocks. What’s common between the two is that a block is a way of collecting and grouping objects into a single entity. As a single entity it becomes easier to select, to manipulate (move, copy, rotate, etc), and easier to share across multiple drawings. Using blocks leads to consistency and standardization as you and your company use the same symbol in all drawings.

The basic type of block becomes static when it is created. It can be moved, scaled, and rotated but the entire block needs to be adjusted. You cannot manipulate individual objects. Think of a door, the geometry representing the door is exactly the same if the door is 2’4 or 3′ wide. All that changes is the length of the door. With regular blocks you would require two blocks, with dynamic blocks you can build one “smart” block that allows for the switching between the two sizes.

1941 Oldsmobile Dynamic Cruiser Club Sedan

1941 Oldsmobile Dynamic Cruiser Club Sedan by Alden Jewell 

When you create a block, the block definition is added to the drawing database. This is the same regardless if you are creating a block or a dynamic block. The difference is that with blocks each instance is exactly the same (even if scaled differently) whereas with dynamic blocks you can have different instances. Take for example the door, I can insert the same dynamic block but have one 2’4 wide and the other 3′ wide.

To create the geometry for the dynamic block you have two options: create, block, edit in block editor OR start the block editor and create the geometry.

When using the block command you can enable the Open in Block Editor option so that immediately after creating the block definition the block is automatically opened in the Block Editor. Alternatively right-click on the block and select Block Editor to open the block definition in the Block Editor.

Launch Block Editor from Make Block Dialog


AutoCAD - Launch Block Editor

The other option is from the Ribbon > Insert Tab > Block Definition Panel > select Block Editor…. create the geometry and when you save the block you will be prompted for the name.

Defining the dynamic components of the block can be accomplished using Parameters & Actions or by using Parametric Dimensions & Constraints. In many cases you will even use a combination of both.  In this first post on Dynamic Blocks lets explore using Parametrics, we’ll look at Parameters & Actions in a future post.

Parametrics and Dynamic Blocks

Parametrics is applying rules (constraints) to define the behaviour of your geometry. If, for example, you add a horizontal constraint to a line nothing will take that line away from being horizontal, other than removing the rule.Parametric dimensions define the size of the object, which is the opposite of AutoCAD dimensions that read the existing size of the object. With AutoCAD objects you adjust the object to the desired size, with parametric dimensions you adjust the value of the dimension and let it adjust the size of the object.

AutoCAD's Block Editor Environment

  1. Saving & Testing the Dynamic Block
  2. Geometric Constraints
  3. Parametric Dimensions
  4. Block Table
  5. Block Authoring Palette – Constraints Tab
  6. Properties Palette

Within Dynamic Blocks adding constraints and parametric dimensions is no different than within the standard drawing area. What’s different is the additional properties that appear on the dimensions within the Block Editor. This includes visibility of the dimension and limiting the size.

In this example the tub geometry is Auto Constrained, an Equal constraint is added to the small fillets, and Linear Dimensions are added to define the Length, Width, and offset of the tub.

Dynamic Blocks - Defining The Tub

After the block is inserted into the drawing any added Parametric Dimension will be listed in the Properties Palette and can be adjusted to adjust the size of the block. Each dimension will additionally appear with a grip when the block is selected, allowing for the adjustment of the objects the dimension is applied to. Making the grip hot allows you to stretch the objects, changing the size, even though its a block…. the power of Dynamic Blocks!

Grip Editing a Parametrically defined Dynamic Block

Back within the Block Editor we can adjust the properties of the dimensions, Using the Number of Grips property you can adjust the value to 0 so that the grips do not appear for adjustment when the block is selected. The Show Properties option, when set to Yes, makes the parameter visible within the Properties Palette.

Dynamic Blocks Parametric Dimensions Grip Properties

In the example of the Tub, the d1 value is a fixed value and should not be changed, meaning it should not appear as an option when the block is selected. With this dimension Show Properties is set to No and Number of Grips is set to 0.

The Tub block I’m building is only available in lengths of 12″ increments, meaning I do not want the user of the block to select anything but a multiple of 12. Additionally the smallest size available is 60-inches.The width is available in only 3-options: 30, 36, and 54.

Within the Properties of the dimension, the Value Set area provides the option to set the Distance Type. Using the Increment option you define the increment available on the dimension and optionally the minimum and maximum. If the user of the block attempts to set the value to something other than the increment allows the dimension value is rounded to the nearest incremented value. Using the List option you define a list of available options.

Dynamic Blocks - Dimension Increment Set

Dynamic Blocks - Dimension List Set


Block Tables

In many situations you will require set sizes of blocks, dimension values that go together. Perhaps the tub when 36″ wide only comes in a 72″ and 84″ long version but when the tub is 32″ wide it is available in 60″, 66″, and 72″ long versions. Building these set configurations is accomplished by the Block Table feature.

To build the configuration launch the Block Table dialog (Block Editor contextual Ribbon > Dimensional panel > Block Table). The first step is select the grip location. This grip is used to select the desired size when the block is selected. Once the grip is located the Block Table dialog appears. You add the parameters you want to manage, this can either be by selecting existing parameters or by creating new parameters. Once the parameters are created you add rows of values, defining each iteration.

Dynamic Blocks - Block Properties Table

Using the Block Table

TIP: Set the Number of Grips to 0 and Show Properties to No for all the dimensions within the dynamic block… allowing for individual dimension override defeats the purpose of the block table

AutoCAD Deep Dive Series: Dynamic Blocks Part 2

AutoCAD Deep Dive Series: Attribute Extraction

In one of the first posts of this Deep Dive on Blocks (Blocks and Attributes) we explored adding attributes to a block. Attributes add variable text to the block, providing the ability to insert multiple instances of the same block definition but each one with different attribute text information. This is great, but an even more powerful feature is the ability to extract attributes. Within AutoCAD you can extract the attribute information from one drawing or a collection of drawings… to an external file or as a table into the drawing… and its easy!

Like most things in AutoCAD there are multiple methods of accessing the Data Extraction wizard. First is straight up in the Ribbon > Insert tab > Linking & Extraction panel > Extract Data button.

AutoCAD Data Extraction Button

Secondly, within the Insert Table dialog select “From object data in the drawing (Data Extraction)

AutoCAD Insert Table Data Extraction

Data Extraction is completed via a wizard, an 8-step process.

The first step is either create or select the data extraction template. As its describes the data extraction wizard requires a template to proceed. The advantage here is if you will be repeating similar extractions you can reuse the template file to extremely simplify the process.

AutoCAD Data Extraction Wizard Page 1

Next select the objects within the current drawing to extract from or select the drawings or folders to extract data from. The active drawing is automatically added to the list. Don’t miss out on the Settings (lower right corner), which provides additional options with how to deal with xrefs and whether the extraction is model space only or it includes the paper space layouts.

AutoCAD Data Extraction Wizard Page 2

Page #3 – Select the objects to extract data from. Its important to note that blocks with attributes are not the only object data that can be extracted. Any object and its properties can be extracted from the drawing, hence why its called Data Extraction and not Attribute Extraction. Have a collection of circles representing holes that you’d like the x,y coordinates? no problem, use this same wizard.

Within the Data Extraction Wizard, any page, right-clicking in the dialog provides options to Check All or Uncheck All making it quick to select the properties desired. Two filters towards the bottom of the dialog provide quick filters to narrow the amount of objects to select from. Display blocks with attributes only limits the selection to just blocks with attributes… doesn’t matter if the block has one or fifty attributes, it’ll show in the list. Display objects currently in-use only limits the list to objects existing in the drawing. Display all object types provides the option to just show blocks.

The Display Name can be adjusted to override the name of the object. For example, if you are extracting the center points of circles you could adjust the display name from Circle to Hole to better describe what the object represents.

AutoCAD Data Extraction Wizard Page 3

Now that the objects are selected you need to set the properties you wish to extract. This can be any of the objects properties or any block attribute. Use the Category filter to reduce the listing, making it easier to find the properties you want to extract. As with the objects you can adjust the Display Name to better describe the property you are including.

AutoCAD Data Extraction Wizard Page 4

A preview of the extracted data comes next (page 5), but more than just previewing the data can be refined as well

AutoCAD Data Extraction Wizard Page 5

  • At any point click Full Preview to see a complete listing of all the objects and their properties being extracted.
  • Clicking the column header sorts the data ascending or descending, if its in the wrong order just click it again to sort the opposite direction.
  • For more sorting options select Sort Column Options, in which you can set multiple columns to sort and the sort priority.
  • drag-and-drop columns to reorder, right-click the column header to rename or hide the column
  • right-click the column header to add a Total Footer to SUM, AVERAGE, MIN or MAX of the column
  • Use the three toggles to show / hide the count and/or name columns and to combine identical rows. Combing identical rows is required if you are after the total quantities of the object.

The above data is refined to hide the Name column (only one block is being extracted, no need to show the name), its sorted by manufacturer, Count was renamed QTY, and a SUM total was added to the Count…

AutoCAD Data Extraction Wizard Page 5b

Now that the objects and their properties have been selected and you refined the data as desired you need to set how you want to output the results. The options are to insert into the drawing as a table and to output to an external file.  With external files the data can be exported to Excel (.xls), Comma-delimited text (.csv), Access Database (.mdb) or to a text file (.txt). The extracted data to an external file is not “live” and will not automatically update with changes to the drawing.

AutoCAD Data Extraction Wizard Page 6

Step 7 is optional and will only be presented IF you are inserting the extracted data into the drawing as a Table. This page is to configure the table. The result is an AutoCAD Table so the style and other table properties can be adjusted after insertion.

AutoCAD Data Extraction Wizard Page 7

Finally, the last step… confirmation the process is complete. Select Finish to complete the process, the table will be inserted and data will be exported to the external file

AutoCAD Data Extraction Wizard Page 8

AutoCAD Data Extraction Wizard Table Results

Awesome! It might seem like a lot of steps but they aren’t difficult and once you’ve completed the process a few times you’ll breeze right through it.

But now what happens if the drawing changes?

The inserted table is managed by a data link, meaning if the drawing changes impact the data in the table you can update the data link – updating the extracted data. Two options: #1 right-click the data link icon in the status bar or #2 right-click the table inserted into the drawing

AutoCAD Table - Update Data Links

AutoCAD Update all Data Links

AutoCAD Data Extraction Update Data Link Results

Here’s the process….

Featured Image “Building Blocks” by Eran Sandler

AutoCAD Deep Dive Series: Annotative Blocks

The annotative tools within AutoCAD provide a one-stop place for managing the size (scale) of your annotations. This means instead of worrying about dimension scales, text heights, linetype scales, and so on you can adjust one scale and have all the annotation objects scale accordingly. Its not an easy collection of features to understand at first, and does require some setup but the benefits definitely out way the pains of learning to use and to set it up.

So you might be familiar with annotation scale within AutoCAD, but are you aware that blocks can be made annotative? That’s right, blocks can scale up or down with the adjustment in the annotation scale just like dimensions, text, and other annotations. So although you might not use this for furniture, hardware, or other components but what about other symbols?

The process to define an annotative block is no different from regular blocks, it just takes one extra enabled option. Within the Block Definition dialog, after you have selected your Base point and the objects, enable Annotative within the Behavior section. (I’ll talk about Match block orientation in a minute). Click OK to create the block and that’s it, you now have an annotative block.

AutoCAD Defining Annotative Block

Like all annotative objects if you roll your cursor over them you will see what I like to call the annotative “A” badge, but in reality is the cross section of a drafting ruler.

Annotative "A" symbol

Now that you have an annotative block adjusting the annotation scale will adjust the scale of the block

AutoCAD Annotative Block Scale

So what is Match block orientation to layout? You’ll need to watch the video to find out!

Featured Image: Block and Punch by Peter Harrison

Join the Community