Michael’s Corner #104
August 2011
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
I 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.
Create a single line of text using Single Line text, Mtext, or an Attribute Definition [ATTDEF; first presented in June 2003].
Draw a rectangle around the text.
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.
Now click OK to open the block in the Block Editor.
Note: The color of the Block Editor background can be edited in
.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.
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.
Click anywhere on the Linear parameter geometry to select it, then open Properties (Ctrl+ 1).
At the bottom of the list of properties for the Linear Parameter, under Misc, set the Number of Grips to 1.
On the Actions tab, click Stretch. When prompted to 'Select Parameter', click the light blue triangle on the right side of the box.
When prompted to 'Specify Parameter Point…, press [Enter] for the default of <Second>
.
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).
When prompted to 'Specify Objects to Stretch', click on the rectangle itself, then press [Enter].
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).
When prompted to 'Specify Parameter Point…, press [Enter] for the default of <Second>
.
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).
When prompted to 'Specify Objects to Stretch', click on the rectangle, then press [Enter].
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.
Open the Properties window (Ctrl + 1).
Under Overrides, set the Angle Offset to 180.
Close Properties, click Close Block Editor and Save your changes to the block.
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.
As 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.
Type CUI to open the Customize User Interface.
Expand Ribbon, then expand Panels, to display the list of all the panels on the Ribbon.
Expand Home 2D — Annotation, then expand Row 3 to display the content of the panel containing the Dimension-related features.
Click Ribbon Combo Box — Dimension Style to display the content of that node in the Panel Preview area.
In the Panel Preview area, click Linear. This will automatically cause the CUI to expand the Dimension Drop-down node under the Panels.
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.
When you're finished organizing that listing, click OK to close the CUI and apply your edits.
Now check out the Dimension drop-down node on the Ribbon to see the result!
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.
I think you can take it from there.
Layer Walk [
] 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!
Open the drawing db_samp.DWG [C:\Program Files\Autodesk\AutoCAD 20xx\Sample\Database Connectivity]
Launch Layer Walk. The layers that are not highlighted (white) are either Off or Frozen.
Make the dialog box as shallow as possible, then select the layers shown in the figure.
After selecting the layers, right-click, then click Hold Selection. An asterisk will appear beside the selected layers.
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.
Hold the GRIDxx layers, then turn on E-F-STAIR and E-F-COLUMN.
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!
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!
If you found this article useful, you might like to consider making a donation. All content on this site is provided free of charge and we hope to keep it that way. However, running a site like CADTutor does cost money and you can help to improve the service and to guarantee its future by donating a small amount. We guess that you probably wouldn't miss $5.00 but it would make all the difference to us.
Note from Michael: I want to thank all of my customers for continuing to retain my training services (some for over three decades!) and let you know your donations do not go to me personally, but to the ongoing maintenance of the CADTutor ship as a whole and to support the yeoman efforts of my friend and CADTutor captain, David Watson, to whom I am grateful for this monthly opportunity to share a few AutoCAD insights.