CADTutor: The best free help for AutoCAD on the web

Michael BeallMichael’s Corner #77
May 2009

Discoveries and Recoveries

by Michael Beall

The discovery this month is a result of an email I received on the day I was writing this article and it had to do with taking X,Y data points that were in Excel, then getting them to create a drawing. Take a look at the Odd Spot for that one. As for the recovery, Workspaces have been around for several versions and I'm just now getting to their coverage, so thank you for your patience on that one.

This month's Power Tool is a long one since it involves a Dynamic Block… but I had a really great time making a video for you to replay! And there's a reminder in Basics about the Taskbar variable; not something I use, but you may be interested in it if your more of a mouse person, than a hot key person.

Spring seems to be taking its good ole time getting around the corner here in Kentucky, but I get to spend some quality on the riding mower.

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

Blessings to one and all,

Workspaces circa AutoCAD 2010

Workspace SwitchingThe Workspace feature has been around since A2006 and although I have trained on it, this is the first time I have written about it; my apologies. Workspace definition (per the Help menu): Workspaces are sets of menus, toolbars, palettes, and ribbon control panels that are grouped and organized so that you can work in a custom, task-oriented drawing environment. (In this image from AutoCAD 2010, I like how they've added the name of the current workspace beside the Workspace Switching icon on the status bar.)

Ribbon Note: The Workspace named 2D Drafting and Annotation provides several Ribbon panels and tabs containing common features needed for 2D drawings. The Workspace named 3D Modeling provides 3D-related features on the Ribbon. Both of these are good starting points, then you can refine the Ribbon a bit more, then saved it as another Workspace.

Cautionary note: I would first create a workspace of your current menu, toolbar, etc. arrangement so you can return to that condition when we're finished ‘experimenting’.

The following procedure has been used on A2008, A2009, and A2010. If you have A2006 or A2007, there may be slight differences, but the idea is the same.

Instructions to Create a Workspace

  1. To save your current workspace by name in:

    Workspace SwitchingA2008, go to the Tools menu, then click WorkspacesSave Current As. Enter a name for the current workspace, then click Save.

    A2009/A2010, click the Workspace Switching icon on the right half of the status bar, then click Save Current As. Enter a name for the current workspace, then click Save.

    Note: In A2008, you may find the Workspaces toolbar helpful in making your selection(s).

  2. Tabs and PanelsNow, configure the position of your toolbars (or the panels and tabs of your Ribbon) to suit your way of working. To turn off panels or tabs on the Ribbon, right click on any panel and you see an item for Tabs, as well as Panels.

    When I was training the folks in Angola on A2008 (which doesn't have the Ribbon), we made a workspace with 2D-related toolbars and one with 3D-related toolbars.

  3. Repeat Step 1 for your respective version, then save the workspace as CT-May09.

  4. To test your workspace, set some other workspace to be current, such as 2D Drafting & Annotation – in A2008 from the Workspaces toolbar, or in A2009/A2010 from the Workspace Switching icon on the status bar.

  5. Now select your newly created workspace and you should be good to go!

Bonus Points…

  • Already existsIf you want to make changes to your Workspace, configure your toolbars/Ribbon first, then use Save Current As and choose the name of the workspace to be replaced from the dropdown list.
  • To delete a Workspace from the list, open the CUI, then expand the workspaces node, then use the right-click menu on the workspace to delete.

Top of page

Power Tool

Dynamic Block Feature: Move + Stretch

Dynamic BlockThere are a lot of Dynamic Block samples on the Tool Palettes, but sometimes I just want to know how to make my own, (thereby enabling me to more accurately edit existing ones).

Here are the instructions on creating a dynamic block that moves the text, while stretching the block geometry. Click here to go to the AutoCAD Stuff page of my website where you can download the DynaDoor and DynaLabel drawings. Insert those into any drawing and they are good to go. For my initial coverage of the dynamic block feature, take a look at the lead article of Michael's Corner, July 2006 to learn how to add multiple visibility parameters to a dynamic block.

Tip: For those of you with a block source drawing containing blocks for your tool palette, insert these dynamic block drawings into that source file, save it, then drag them onto your tool palette. See Michael's Corner, Basics, March 2006 for more information on the importance of the block source drawing for tool palette blocks.

Instructions to Create a Dynamic Block Combining Move & Stretch Actions

  1. In Model Space, draw a polyline with a Width of 1/16″ that is 8″ long.
  2. Add a text object (Dtext or Mtext) with a Height of 1/2″, below and aligned with the end of the line.
  3. Launch the Block command, and check the box and the bottom to Open in Block Editor.
  4. Enter a Name for the block (I'm calling mine DynaLine), Select the objects, specify the left endpoint as the Basepoint, then click OK to open the Block Editor.
  5. On the Parameters tab of the Block Authoring Palettes, click Linear Parameter, then accurately snap to the left endpoint, then the right endpoint of the polyline. Place the Distance label above the line, just like you would a dimension line.
Distance 1
  1. Select the Distance label, then open Properties. Scroll down and change the Number of Grips value to 1. This setting will result in one parameter (cyan arrowhead) on the right endpoint of the line. You can now close the Properties window.
Number of Grips
  1. On the Actions tab, click Move Action.
  2. When prompted to select the parameter, click the cyan parameter at the right end of the line. A red circle and X appear on that parameter.
  3. Press [Enter] to accept the default parameter association of <Second>.
  4. When prompted to select the objects for the Move action, select the text, then press [Enter].
  5. Prior to A2010, you are prompted to position the yellow lightning bolt icon. Turn off Ortho (the icon moves erratically if you don't),then place the icon off to the side anywhere. In A2010, the (more elegant) action icon is automatically placed off to the right.
  6. On the Actions tab, click Stretch Action.
  7. When prompted to select parameter, click the same cyan parameter, then press [Enter] to accept the default parameter association of <Second>.
  8. StretchSpecify two corners of the Stretch frame, similar to what you see here.
  9. When prompted to select objects for the stretch, click anywhere on the polyline, then press [Enter]. The text object is already associated with the parameter from the previous steps.
  10. Prior to A2010, you are prompted to position the yellow lightning bolt icon. Position the icon anywhere off to the side; if you're using A2010, it is automatically placed for you.
  11. Click Close Block Editor, save your changes, then click on the block to display the stretch parameter icon. When you click it, you have enabled the stretch action… and the text moves with it!

Video TutorialDynamic Blocks Video Tutorial

Top of page

The Odd Spot

Coordinates from Excel into AutoCAD

Script in NotepadI received an email from a friend of mine at Nicholson Construction asking if there was an easy way of taking coordinates out of Excel and creating a drawing from those values, rather than inputting them, one set at a time. Yes, actually, there is… and it is amazingly simple if we create a script (.SCR) file.

Prerequisite: The X and Y values need to be in a single cell in the format of X,Y for this to work. If X and Y have their own column, you will need to make the necessary adjustments to get them to X,Y format.

Instructions to Create a Drawing with X,Y Coordinates from Excel

  1. In Excel, highlight and Copy the column of X,Y coordinates to be used to generate the drawing.
  2. Open Windows Notepad (StartAll ProgramsAccessoriesNotepad).
  3. Before pasting the coordinates, type LINE as the first word in the file (this will launch the Line command when the script is run), then press [Enter].
  4. Now Paste the column of coordinates into the file and you should see something like that shown in the figure.
  5. Close and save the .SCR file (remember where you're saving it).
  6. In AutoCAD, launch the SCRIPT command, then navigate to where you saved your file in the previous step, then select it and click Open. AutoCAD will launch the Line command then, beginning at the first set of coordinates entered, will draw line segments from one point to the next.

You may also want to consider…

  • Replacing the LINE command with the PLINE command.
  • Adding the word CLOSE as the last word in the script to have the linework close back to the start point.
  • Dragging the .SCR file out of Windows Explorer and dropping it into the drawing window.

Top of page

The Basics

Separate Drawings on the Taskbar

By default, when you have AutoCAD open, you see one AutoCAD icon on the Windows taskbar, regardless of how many drawings you have open, as you see in this first image.

Taskbar (default)

For those of you who want to see icons displayed along the Windows taskbar for all the drawings you have open, you will be happy to know the AutoCAD variable of… well, Taskbar… can make that happen.

Set the TASKBAR variable to <1>, then, when you have more than one drawing open, you will see an icon for each of the open drawings.

Taskbar (drawings displayed)

Top of page

Left Field

A Bit of Bar-B-Q Trivia: During the 1940s and early 1950s, George Stephen worked for Weber Brothers Metal Works, outside Chicago where he gained experience in shaping and fabricating metal parts, including dome-shaped buoys for use out on Lake Michigan. An avid barbecuer, he became increasingly frustrated with the uneven and uncontrollable flame of the open brazier grill he used at home. While at work, his grilling experience merged with his skills as a metal worker. "We were making dome shapes at the shop," Stephen once said. "I took one of the domes, drilled some holes in the bottom and lid, welded supports to hold two wire grates, and gave my strange looking kettle-shaped grill a try. It worked great." So began the storied and far-reaching history of the Weber Grill.

Share this page:

Share at Facebook Submit a link at Reddit Share at StumbleUpon Share at Share at Technorati

Local Navigation

Sponsored Links

Accessibility statement

Valid XHTML 1.0!Valid CSS!Creative Commons Licence