CADTutor: The best free help for AutoCAD on the web

Michael BeallMichael’s Corner #104
August 2011

Hot Fun

by Michael Beall

Some of you are filling in the rest of the song, "…in the summertime", the 1969 hit single recorded by Sly & the Family Stone. As I'm writing this, I'm beginning to appreciate — dare I say 'long for' — the oft-quoted "dry heat" of Phoenix, after spending time in the Caribbean, Florida, and now this curious hot spell we've had here in Kentucky the last several weeks.

Customizing takes the first three spots this month as I looked back over some of the requests I received from my customers recently.

…Creating a dynamic block that can be sized (using a Linear parameter) to accommodate the text string
…Adding a command to an existing drop-down list on the Ribbon
…Organizing the position of the columns in the Layer Properties Manager
…Using the 'Hold' feature in Layer Walk

Hopefully these will make your summertime a bit more productive!

If you would like to contact me directly, you can do that also.

Blessings to one and all,
Michael

Dynamic Block: Two-Directional Stretch

Dynamic blockI love dynamic blocks; love 'em, love 'em, love 'em! So when I found this request among my sticky notes, I figured I should wrestle this one to the ground and show you how to do it.

The really cool thing about this exercise, is it can also be used in AutoCAD LT!

Note: You can use the following procedure on Single Line text, Mtext, or an Attribute Definition (which is what I'm using in this exercise). The Stretch action assigned in this exercise is horizontal. Similar methods can be used to create a Stretch action that is vertical. And finally, previous articles on Dynamic blocks can be found in Michael's Corner May 2009 and April 2008.

How to Create a Dynamic Block that Stretches in Two-Directions

  1. Create a single line of text using Single Line text, Mtext, or an Attribute Definition [ATTDEF; first presented in June 2003].

  2. Draw a rectangle around the text.

  3. Open in Block Editor

    Launch the Block command — give it a name, select the text and rectangle, and specify a basepoint — then be sure to check the box for Open in Block Editor.

  4. Now click OK to open the block in the Block Editor.

    Distance 1Note: The color of the Block Editor background can be edited in OptionsDisplayColor.

  5. On the Parameters tab of the Block Authoring Palettes, click Linear. Placing a Linear parameter is essentially like picking the two points for, then placing, a dimension.

  6. When prompted to 'Specify the Start Point', use Snap to Midpoint and pick the middle of the left side of the rectangle, then use Snap to Midpoint again, and pick the opposite side, as shown in the figure. Place the location of the Distance label above the rectangle.

  7. Number of Grips

    Click anywhere on the Linear parameter geometry to select it, then open Properties (Ctrl+ 1).

  8. At the bottom of the list of properties for the Linear Parameter, under Misc, set the Number of Grips to 1.

  9. On the Actions tab, click Stretch. When prompted to 'Select Parameter', click the light blue triangle on the right side of the box.

  10. Specify parameter point

    When prompted to 'Specify Parameter Point…, press [Enter] for the default of <Second>.

  11. When prompted to specify the corners of the Stretch frame, specify two corners similar to the dashed box shown in the figure (around the right side of the rectangle).

  12. When prompted to 'Specify Objects to Stretch', click on the rectangle itself, then press [Enter].

  13. On the Actions tab, click Stretch. When prompted to 'Select Parameter', click the light blue triangle on the right side of the box (the same one as in step 9, above).

  14. When prompted to 'Specify Parameter Point…, press [Enter] for the default of <Second>.

  15. Specify corners

    When prompted to specify the corners of the Stretch frame, specify two corners similar to the dashed box shown figure (around the left side of the rectangle).

  16. When prompted to 'Specify Objects to Stretch', click on the rectangle, then press [Enter].

  17. Click on the small Stretch Action icon that was added after assigning the 2nd Stretch Action. The Distance1 label will highlight and you will see two grips on the dotted box indicating the selection window associated with that action.

  18. Overrides

    Open the Properties window (Ctrl + 1).

  19. Under Overrides, set the Angle Offset to 180.

  20. Close Properties, click Close Block Editor and Save your changes to the block.

Dynamic block in action

Now you can click on the block, then click in the blue Linear parameter grip… and when you move it, both sides stretch!

Bonus Points: Add this block to your 'block source' drawing, then put it on your favorite tool palette so you can bring it in to any drawing!

I would like to thank my dear friend, Kate Morrical, for her input on the Discussion Groups way back in 2007(!) for this insight. Also, you will find three other dynamic blocks available for download on my website.

Top of page

Power Tool

Add a Dimension to the Combo Drop-down on the Home Tab

RibbonAs Autodesk developed the Ribbon, they clearly had to make some judgment calls on which commands would get preferential treatment. On the Home tab, Annotation panel, there's something called a Ribbon Combo Box that contains several dimensioning commands.

Here's how to add the ones that you like.

Note: Since the Ribbon condition is Workspace-specific, save any changes you have made recently to your Workspace before beginning this exercise.

How to Add a Dimension to the Ribbon Combo Box

  1. CUI PanelsType CUI to open the Customize User Interface.

  2. Expand Ribbon, then expand Panels, to display the list of all the panels on the Ribbon.

  3. Home 2D

    Expand Home 2D — Annotation, then expand Row 3 to display the content of the panel containing the Dimension-related features.

  4. Click Ribbon Combo Box — Dimension Style to display the content of that node in the Panel Preview area.

  5. Panel Preview

    In the Panel Preview area, click Linear. This will automatically cause the CUI to expand the Dimension Drop-down node under the Panels.

  6. Drag and drop

    Under the Command list, find your preferred dimension routine — I'll be getting Dimension, Continue — then drag and drop it into the Dimension Drop-down list of commands.

  7. When you're finished organizing that listing, click OK to close the CUI and apply your edits.

Drop-down node

Now check out the Dimension drop-down node on the Ribbon to see the result!

Top of page

The Odd Spot

Layer Properties Header Organization

I forgot all about this until someone from one of my classes in the Dutch Caribbean last month asked me about organizing and displaying the column headers in the Layer Properties Manager.

Although the right-click menu initiated from the body of the layer list is quite extensive, you will need to right-click in the header line to see the list of the column heads… and the Customize item.

Customize

I think you can take it from there.

Top of page

The Basics

Layer Walk: the 'Hold Selection' Feature

Layer WalkLayer Walk [Home tabexpanded Layers panel] is one of my favorites and one that I promote in virtually all my training sessions.

When using Layer Walk, you can select more than one layer using the Ctrl key for random selections, the Shift key for a range, or you can simply click and drag your cursor across the layers you want to select.

But if you have a long list of layers, it's easy to forget the layers you may have selected already, so use Hold Selection!

How to a Use the 'Hold Selection' Feature in Layer Walk

  1. Open the drawing db_samp.DWG [C:\Program Files\Autodesk\AutoCAD 20xx\Sample\Database Connectivity]

  2. Launch Layer Walk. The layers that are not highlighted (white) are either Off or Frozen.

  3. Select the layers

    Make the dialog box as shallow as possible, then select the layers shown in the figure.

  4. After selecting the layers, right-click, then click Hold Selection. An asterisk will appear beside the selected layers.

  5. Scroll down and select the layers named GRIDLN and GRID-08. To view the content of both layers, you will need to use Ctrl… which brings us to the point.

    When selecting those two additional layers, the original selection set is still displayed. Had you not used the Hold Selection feature, only the GRIDxx layers would be displayed.

  6. Hold the GRIDxx layers, then turn on E-F-STAIR and E-F-COLUMN.

  7. Before you click OK, be sure to clear the checkbox for Restore on Exit.

Hopefully you see where Hold Selection can give you a bit more control over layer visibility and selection when using Layer Walk!

Top of page

Left Field

Smallest Multi-Nation Island on the Planet:
Saint Martin (French: Saint-Martin; Dutch: Sint Maarten) is an island in the northeast Caribbean, approximately 300 km (186 miles) east of Puerto Rico. The 87 km2 island is divided roughly 60/40 between France (53 km2) and the Netherlands (34 km2), however, the Netherlands side has the larger population. It is one of the smallest sea islands divided between two nations, a division dating to 1648. The southern Dutch part comprises Sint Maarten and is one of four constituent countries that form the Kingdom of the Netherlands. The northern French part comprises the Collectivité de Saint-Martin (Collectivity of St. Martin) and is an overseas collectivity of France. (Source: Wikipedia)
Great food, great people, and now 36 of 'em use AutoCAD a whole lot better!

Share this page:

Share at Facebook Submit a link at Reddit Share at StumbleUpon Share at del.icio.us Share at Technorati

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence