Back

Dynamic AutoCAD

The focus this issue of AUGIWORLD is on third-party apps and there are quite a few of them out there.  Some can greatly increase your productivity by automating design and drawing processes.  Most of these apps build on the power of AutoCAD® while making the process easier for the end user.  

But there’s a powerful tool within AutoCAD itself. The product's ability to create and use custom blocks allows you to make virtually any symbology you wish to represent real-world items and save them as blocks.  By creating a block, you can reuse geometry over and over without redrawing it.  Blocks are a great way to minimize repeating drawing tasks and maintain a standard look for your symbols.  Architects tend to deal with architectural real-world "symbols" such as doors, windows, furniture, appliances, etc. Engineers use some of the same types of real-world symbology in lights and equipment. 

In the course of a design day or project timeline, these symbols are moved, copied, mirrored, rotated, and sometimes completely replaced.  An efficient way to reduce your workload and speed up these changes is to use dynamic blocks.  Dynamic blocks were introduced in AutoCAD 2006 and can be created and used in AutoCAD LT as well.  Creating blocks that have dynamic properties or adding dynamic properties to an existing block will enhance the block's usability and can greatly reduce block counts.  In this short article, I will go over some basic features of dynamic blocks that can make your blocks more flexible and save you editing time.

Let's start with an example of something that affects both architects and electrical engineers—lighting. Architects use lighting to enhance the visual appeal of spaces while electrical engineers use it to provide required illumination. In order to show the different types of lighting in a building, you could put letters and numbers next to a light symbol to indicate what it is, then a schedule could be referenced to describe the fixture in more detail.  But if you actually gave each block a unique look, you could tell what it is just by looking at it. This also helps the project owner or client visually see what the light is by just looking at the floor plan.  One commonly used light fixture is the 2x4 or 2x2 recessed fixture found on almost every commercial project.  Although these fixtures are one size, they can represent a variety of lighting types (prismatic, parabolic, LED, direct/indirect as well as the “emergency” version of each).  

Figure 1 shows a small variety of light fixture types. All of these light fixtures are actually in one block and use the Visibility Dynamic option to change to views that represent each individual look.  With this one block, you could place 2x4 fixtures throughout your project. Then in rooms that needed specialty fixtures such as parabolics, you would highlight the fixtures in the room or rooms, right-click and select Quick Properties, and choose the parabolic version from the drop-down menu. You could repeat the same process for the lights required to be emergency or night lights as well. The variety of lighting types used on a project that are similar in nature but have some unique characteristics could easily be shown in a single block and quickly changed using the dynamic Visibility State option.

Figure 1

Since I currently work in the electrical design world, the example block I will use is one of the dynamic blocks I use on a regular basis. The steps outlined here will work for any trade or block—you just need to determine which feature will benefit you in your work and use that when defining or modifying your blocks.  I use dynamic blocks for two primary reasons: to minimize the number of blocks required to represent items in a drawing, and to make changes quicker.  

You may want to start using dynamic blocks by creating new blocks from scratch. Because you probably already have an extensive block library, a better approach may be to modify an existing block that you currently use by adding dynamic features to it.

Let's take a basic duplex outlet and add some parameters to make it more flexible.  You can follow along with any type of block that you already have and want the ability to change its look on the fly (Visibility State).

Like any customization process, there are a series of steps that you would typically go through to implement your ideas. 

Dynamic Block Creation Steps

  1. Start out by planning what you want your block to do.  Often this comes from experience with blocks that you keep replacing, rotating, flipping, or changing out.
  2. Draw your block geometry or edit an existing block to add dynamic features.
  3. Choose a Parameter. There are various parameters to choose—see Figure 2 for a screenshot of the dynamic options palette and the descriptions of each option we will be covering.
  4. Match an Action with your parameter (see Figure 3).
  5. Test your option.
  6. Repeat steps 1 - 5 for each dynamic option.

Figure 2

Figure 3

For this article I will cover the Visibility, Flip, and Move Parameters/Actions.

For the dynamic block demonstration here, I will start with a simple duplex receptacle outlet and then add a variety of options and features to that block to enhance its usability.

Duplex Outlet

Like many blocks, a duplex outlet is composed of basic lines and a circle.  From my experience working with duplex outlets, I know that the basic outlet often gets changed out for a quad outlet or combined with TV or data jacks. To make my job easier, I do not want to erase the old block and insert a new one for each change I need to make.  So let’s start there and build on it.  I will resolve the first issue with Visibility States, using a Visibility Parameter. Visibility States allow you to change the look of a block by selecting a pull-down menu and choosing the new look or “state.”  Note that Visibility is the one parameter that does not require an Action item associated with it.

Figure 4

I open an existing block called 'OUTLET' in AutoCAD and type Bedit to open the block editor. Figure 5 shows the block editor toolbar. If you are not a ribbon rebel like me, see Figure 6 for the ribbon version of the block editor.

Figure 5

Figure 6

When entering the block editor, you will get the dynamic options palette shown in Figures 2 and 3, and the block editor toolbar or palette shown in Figures 5 and 6.  As stated above, my first step is going to make the outlet represent either a duplex or quad outlet, and to do this I will use the Visibility option off the dynamic block palette.   

I select the Visibility parameter option and place it next to my block.  When doing this, think about how your final block look will change so that your parameter does not end up under some of your line work.  I now see a new toolbar on the screen, the visibility toolbar (Figure 7).  I select the button that opens up the Visibility states option and rename the default menu item to 'DUPLEX'.  I then select 'New', and name the new state 'QUAD'.  You may be asked if you want to “Leave the visibility of the existing objects unchanged in the new state.”  I am only going to be adding line work for this particular view, so I will choose the option to leave the objects in the new visibility state as it currently is.  Note that you can determine the default view or visibility state by moving the one you want as default to the top of the Visibility States list (Figure 8).

Figure 7

With the QUAD state checked off in the list, I'll then draw my two horizontal lines across my duplex outlet to represent the quad outlet.  Once this is done, on the block editor toolbar/palette there is a small symbol with a check mark next to it.  This is the symbol to test the new dynamic options. 

Once the block is highlighted in the test mode, a blue triangle will show up off to the side.  By selecting the triangle I can choose between the duplex and quad display options.  If all is well, I can move on to the next parameter; if not, I can make the necessary corrections and test again.  Once testing is complete, this block will now have two visibility states and will have many more added.  

Because many times data jacks are placed next to outlets, it would be nice to be able to add a data jack on the fly and keep it locked or linked to the power outlet if it gets moved.  This is done by inserting the data outlet block adjacent to the duplex outlet.  By inserting the data block rather than redrawing the geometry, you have created even more flexibility.  If your company standards change or you need to present the data outlets in a particular fashion on a single project, you can modify the data block by itself and it will update all of the data and duplex/quad outlet combinations. To keep items lined up, draw some temporary sketch lines if needed. Just remember to delete them before you do your final save and close of the block.

With the duplex and a quad outlet and a data outlet all in one block, there are now four possible scenarios or Visibility States: the duplex or the quad outlets by themselves or combine each one with a data outlet for total of four visibility states.

Now that we have a more flexible outlet, another issue that often comes up is that we sometimes need to flip the data outlet or TV outlet to the other side of the power outlet.  For this, I will add a Flip parameter and a Flip action.

Tip: When adding new parameters and actions and you have multiple visibility states, make sure you are on the state that you wish to perform the new action.  This is not a deal-breaker, as it can be corrected with a few extra steps, but keep it in mind. 

Figure 8

For the flip action, I will select the Flip parameter on the Parameters palette. A prompt will require selecting two points.  The two points will be the line that I will mirror or flip about and will be placed at a location on the block symbol that represents a good mirror location line.  Since my block base point is at 0,0 and it is symmetrical, I will type 0,0 for the base point.  For the endpoint of the reflection (mirror/flip) line I will choose the top-center of the outlet.

Once the parameter is placed, I switch to the actions section of the palette and choose the Flip action.  The purpose of the Flip action is to mirror or 'flip' something like the data jack to the opposite side of the power outlet. When adding an action to a dynamic block, I need to select the Parameter and then the objects that the action will affect—in this case, the data jack. Remember to test the block before moving on to other features.  Do the same flip action for objects in each visibility state for any items that require flipping. In the case of the duplex and quad outlets with data combination, I will make sure that the Flip action is visible in each state.

Now that we have added the Flip parameter and action, another one that could come in handy is the Move action.  An example for this would be an outlet that has a GFI text item placed next to it.  Depending on how busy the drawing is, the GFI notation may need to be moved around to remain readable.  I’ll start by setting the Duplex visibility state as current, and create a new state called DUPLEX-GFI, then add the GFI text to the screen near the outlet using the Dtext command.

The Move action does not have a Move parameter, so I need to choose another parameter to accomplish this.  On the Parameters palette I will select the Point parameter option and place it at the insertion point of the GFI text. This will become my move grip.  On the Actions palette, I then select the Move option and select my Point parameter and then my text when prompted to select objects.  As per all previous parameter/action additions, I then will test the block before moving on the next step.

Note that the GFI text may show up on the quad or duplex outlet, so when I place the GFI text and move parameter I will want to make sure that it shows up in any visibility state where it is an option.  For demonstration purposes I am only going to include the GFI in the DUPLEX-GFI and QUAD-GFI visibility states (new states).  Since this text and move option were only added to the new DUPLEX-GFI visibility state, I need to make some other adjustments. I will go to the Visibility Sate menu and choose the QUAD state and select ‘New.’ I will add a visibility state called QUAD-GFI and make sure it is set current.

There are multiple buttons on the visibility state menu. One allows selecting objects to be turned off in the current state (hidden open square), and another allows turning objects on in the current state (solid filled square).  In order to turn objects on in the current state that aren't visible, I will need to select the third option, which is represented by two squares—one shaded, one open.  When this option is selected, all items appear on the screen but those that are not in the current visibility state will be greyed out or lighter.  Because the GFI text was added to the DUPLEX-GFI visibility state, it will show up in the QUAD-GFI visibility state lighter. Select the single shaded square to select items that you want on in the current state.  For this you will need to select both the text and the move parameter and action. Now the GFI text and the ability to move it will show up in both the DUPLEX-GFI and the QUAD-GFI visibility states.

Tip/Trick: If you individually insert quad outlets by themselves as often as duplex outlets and you do not wish to choose that state each time, start by creating your master OUTLET block, save it as a block called OUTLET-D, then do a Saveas to Outlet-Q and set the QUAD state as default.  When adding features, be sure to Saveas to each block name and verify that  the proper default state is set to current.

I continued these options to add TV outlets as well as a center shaded area in the outlets to show whether an outlet was to be installed at standard height or at countertop height. After that I added a couple specialty outlets and combinations.  With all these additions, I now have a total of 12 visibility states within one block (see Figures 9 and 10).

Figure 9

Figure 10

There are far more powerful options in the dynamic block palettes that are not covered here, but I encourage you to investigate them and see how they can benefit you further.  For instance, the rotate, scale, and stretch parameters and actions will add even more flexibility to your blocks.

Combining Wipeouts into your blocks will add even more flexibility. For instance, in our light fixture block, adding a  wipeout behind the fixture keeps anything else on the ceiling plan from bleeding through; e.g., putting fixtures in a gypsum board ceiling that is hatched with a pattern. Other examples would include room name blocks that have wipeouts to mask the background or door blocks that have wipeouts to hide the wall underneath, making it appear that wherever you place your door on that wall is automatically cleaned up.

Summary

With dynamic blocks, you can include all variations in one file and manipulate its visual appearance rotation and direction by using dynamic options. You can also make widespread changes in a project by selecting all the fixtures you wish to change and do it with the Properties or Quick Properties commands rather than by removing and re-inserting different blocks.  With dynamic blocks, you can minimize the number of blocks required to represent items in a drawing and can make changes quicker. 

Appears in these Categories

Back