Você está na página 1de 20

ATP254

AutoCAD 102 – Improving Your


AutoCAD Survival Skills
Segment 1

Date: October 5, 2009

Instructor: Kenneth Leary


Level: Beginning
Category: AutoCAD

Web: www.AUGI.com

1
Introduction
Welcome to AutoCAD 102, the second in this series of beginner AutoCAD classes. If you took the first
course in this series you should now know many of the do’s and don’ts and how to survive in the
AutoCAD world. This course will delve more into the program and reveal some lesser known and,
sometimes nearly hidden, powerful commands in AutoCAD. Before long you’ll be able to amaze your
coworkers with your knowledge of the timesaving features created to increase productivity.

We’ll also look into the 2006 CUI menu interface to show you how to create some basic custom menus.
Lastly, we’ll throw in some more tips and tricks, because the fans demand it.

Powerful Hidden Commands


There are a lot of powerful commands in AutoCAD that aren’t always taught in most Drafting programs.
A majority of experienced AutoCAD users don’t use more than 30 percent of the program. While no
commands are actually “hidden” there are a lot of commands that are not well known but can be very
powerful.

The Properties Command


It’s always good to make new friends. One of your
best new friends is the Properties dialog box.
Keeping with AutoCAD tradition, there’s more than
one way to open it. You can type the word
“Properties” at the command prompt, press the CTRL
and 1 buttons. or select it from the Tools menu as
shown on the right.

The Properties dialog box is content sensitive,


depending on what object or objects you select will
change what properties you can modify with the
command. This is such a powerful tool I would
suggest leaving it open and moving it to one side of
the other of your screen.

The dialog box can be minimized just like the Design


Center and Tool Palettes windows. When you move
your mouse over the minimized tool bar it will expand
to the full dialog box.

Good idea: You can “dock” it to side by simply dragging and dropping it beyond the drawing
window.

2
There are several methods for adding your selection to
the Properties command. The most straight forward way
is to pick the Select button. You can type pselect at the
command prompt or click on the icon. The icon is
located on the upper right hand corner of the Properties
dialog box. The image to the left shows where it is
located.

Simply select the entities and hit the enter key and the
entities are selected and opened in the Properties Dialog

Of the three icons, the one on the left is kind of the odd
man out. This icon is actually a toggle for a system
variable, not a command. It toggles on or off the
PickAdd system variable. PickAdd controls how
selected items are added to the selection set. Here’s
how it works.

Setting PickAdd to 0 turns off the variable. When this


happens the object or objects that were last selected
become the selection set. All objects that were
previously selected are removed from the selection set.
You can still add more objects to the selection set by
pressing SHIFT while selecting.

Setting PickAdd to 1 turns on the variable. Each object selected, weather you pick it, use a window or
crossing, is added to the current selection set. In this case you can use SHIFT while selecting to
remove objects from the set.

Quick Select

Quick Select is in itself a powerful command. You can


either select the icon in the properties dialog or type
Qselect at the command prompt. With Quick select you
can select or remove objects by their specific properties.

Using you Quick Select you can filter selection sets by


property (such as color or linetype) and by object type
(circles, text, plines). You can either choose the specific
objects from a group of objects in a selected set (window
or crossing) or from the all the objects in the drawing.
For example, you can select all of the yellow text in a
drawing without selecting any other objects or you can select all objects except the yellow text.

Note: Keep in mind when selecting entities by property first consider whether these
properties are by entity or BYLAYER for any objects in your drawing. For example, an

3
object may appear red because its color is set to BYLAYER and the layer color is red.

Divide and conquer


The Divide command is a great
drawing tool that rarely gets the
attention it deserves. With it you can
place a specified number of points
on an object.
When you type Divide at the
command line it will prompt you to
select an object to divide. This can
be a line, polyline, arc, etc. The
Divide command will not actually
modify the object you select.
After you select the object it will prompt you with “Enter the number of
segments or [Block]:” We’ll cover the Block in a little bit. The
confusing part of this command for some people is segments option.
You count the “spaces” not the number of points. For example, if you
want to place two points on a line then you would input 3 for the
number of spaces. The figure above should help explain it too.
Once you input the number of
spaces it will place points (nodes)
along the entity that you selected.
Your other option is to choose to
insert a block rather than points.
At the prompt where you can enter
the number of segments type “B” for
the Block option. You will then be
prompted for the block name to
insert. When you type in the name of the block you want you are then
asked “Align block with object? [Yes/No] <Y>:” The image on the left
is an example of one that is not aligned with the object.
This is a case where the object is inserted with the default rotation of
the block being used. When you select to “align a block with the
object” it will insert the block with a rotation to match where the point
falls on the object. See the figure to the right.
Note: The start point (listed as Vertex 1 in the properties dialog) of the object that you
pick will determine the starting point of the Measure command. Keep this in mind when
you’re creating the object

Good idea: Make sure that your PDMODE setting is one that will allow you to see the points you
just placed. PDMODE settings of 0 or 1 will make the points virtually invisible.

4
Measure is not the same as Distance
It may seem laughable once you’ve
already learned about it, but a lot of
people expect the Measure
command to do what the Distance
command does. It does not
“measure” the length of an object. It
works in similar manner to the Divide
command. The difference being that
the Measure command places points
or blocks along an object at a specified distance rather than a specified number of spaces. For
example you can place points at 50’ intervals along a pline. Just like Divide you can also place blocks
as well as placing points.

Note: Measure does not place a point or block at the endpoint of the line that you pick.

An array of possibilities

The Array command allows you to create


multiple copies of objects in a rectangular or
polar (circular) pattern. At times you may need
to create multiple regularly spaced objects,
when that happens; arraying is a lot faster than
copying.

For rectangular arrays, shown in the figure on


the right, you control the number of rows and
columns and the distance between each.

On the right side of the dialog box you


can see the preview window which
shows how the settings affect the
array. It’s not an exact preview like
plot preview, but it does represent how
the array will copy the object. The
darker square represents the original
object that is selected for the array.

A rectangular array is built along a


baseline, this angle is zero by default.
The rows and columns of a
rectangular array are orthogonal (left
to right and up and down) with respect to the X and Y axes. The angle of the array baseline can be
changed in the Angle of Array box shown highlighted on the right. A positive angle will rotate the copied
objects counter clockwise and a negative number rotates in a clockwise direction.

5
The same positive and negative
number input works with the offsets as
well as rotation. The image on the left
shows how negative inputs for the
Row and Column offsets change the
array. In the preview you can see that
it is now down and to the left of the
selected object.

When you create a polar array, you control


the number of copies of the object, the
angle, and whether the copies are rotated.

The items are spaced by both the total


number of items to be copied and either the
total angle to fill or the angle between the
copied objects.

A polar array functions much like the


rectangular array, it’s drawn
counterclockwise or clockwise, depending
on whether you enter a positive or a
negative value for the angle to fill.

The radius of the array is determined by the


distance from the center point to a reference
point on the last selected object. You can
specify a new base point to be used as the
reference point or use the default, which is
usually an arbitrary point near the object
selected.

The highlighted box in the figure to the right


allows you to go into the drawing and specify
the information rather than typing the number
into the box next to it.

The small box in the lower left hand corner of the dialog box is the toggle to rotate the items as copied.
This works in the same manner as rotating objects in the Measure and Divide commands

6
You can change the limit of copies that Array creates by setting the MaxArray system
variable with a number between 100 and 10000000 (ten million). When changing the
value of MaxArray, you have to enter it with the capitalization shown.

In the next Segment


I hope you found some useful information in this first segment. In the next segment we’ll tackle the CUI
interface and creating custom menus.

7
ATP254
AutoCAD 102 – Improving Your
AutoCAD Survival Skills
Segment 2

Date: October 19, 2009


Instructor: Kenneth Leary
Level: Beginning
Category: AutoCAD

Web: www.AUGI.com

1
Introduction
Welcome to Segment 2, in this segment we’re going to tackle the CUI menu interface to show you how
to create some basic custom menus. The Custom User Interface gives you the ability to customize
AutoCAD to better fit your needs. We’ll cover some of the main concepts and go into more specifics on
several of the topics that will have the biggest impact on your efficiency.

What is the Custom User Interface


In previous versions of AutoCAD customization was possible by editing the menu files. These .MNU
and .MNS files were made with ASCII text and could be edited with a simple text editor like Notepad.
Customization was often tricky because a simple syntax error like a semicolon in the wrong place or
misplaced quote and your menu file was invalid. It often ended in a trial and error method of testing the
menu and returning to the text file to fix any errors.

AutoCAD 2006 remedied this situation with the introduction of the Custom User Interface (CUI). The
new environment involves a graphic interface and now allows modifications to be done inside AutoCAD.
Instead of editing the menu files in ASCII text the CUI interface uses an Extensible Markup Language
(XML) based format.

Once you become familiar with the interface it actually simplifies the task of customization. This gives
you the ability to customize menus, workspaces, toolbars and even keyboard short cuts all from one
interface. How nice would it be, to be able to have different sets of toolbars open for different tasks?

Accessing the Custom User Interface


This could come as a complete
shock to you but there is more
than one way to access the
Custom User Interface Dialog.
You can type CUI at the command
prompt or you can go to the Tools
pull down menu and select
Customize and then Interface
(shown in the figure on the right).

You can also right click over an icon or right click in the toolbar area but not
on any toolbar and select the Customize option. This is shown in the figure
on the left.

2
Understanding the Custom User Interface
The figure above shows the Custom User Interface Dialog, we’ll briefly cover the different parts of the
dialog box and help get you familiar with their functions. The CUI interface is divided into two tabs, the
figure above is displaying the Customization Tab. Most of your work will be done in this Tab. The other
tab is the Transfer Tab, this where you transfer menu items from existing menus to the new ones. Lets
look at each section of the Customization Tab in more detail. Just like a real window each section is
referred to as a pane.

3
Customizations In
The figure to the right shows the Customizations
In pane. This pane is very import, it determines
which menu file is being modified and offers a
tree view of all the elements in that menu file.
The menu bar across the top has a drop down
menu that allows you to choose which CUI file to
modify.
The three icons on the right are used to partial
load menus, save the changes made to the
current menu, and to change the appearance of
the tree view.
The tree view shows the different elements of the
current CUI file. Each one of these is commonly
referred to as a node. This is only really important
to know when you’re speaking to programmers
and don’t want to sound stupid.
Good idea: Try right clicking on all of the
nodes and see what options are available
to each.

Command list
This pane is located directly under the
Customizations In pane. It is a list of all the
commands in the currently loaded menu file.
The New button is used to create a new
command. When you click on it the two panes
on the right side show the information for the
new command you are about to create.

4
Preview Pane

This pane is located on the upper right hand


side of the Dialog box. This pane does
exactly what the name says; it previews the
new toolbar or the icon for a new command.
It’s content sensitive and will change to
show what you are editing or creating.

Properties Pane
This pane is located in the bottom right hand corner
of the dialog box. It functions much like the
Properties dialog box that we covered in the last
segment. Depending upon what object you are
modifying the content will change.
The figure on the left shows the properties of the
toolbar that I’m using as an example in the Preview
Pane above. The properties it displays will change
for different objects that are being edited.

5
The Transfer Tab
I’m showing you this one last but it’s really the one you’ll most likely use first. The Transfer tab is used
for exactly what the name says, you can transfer menu elements from the main CUI file to a new CUI
file. The default when you open the transfer tab is to create a new file, but you can use the roll down
menu to open another file or save the current one.

Creating a custom Toolbar


The safest way to customize your AutoCAD
menu file is to create a new CUI file and
make your modifications there. You want to
avoid modifying the default AutoCAD menu
for several reasons. First off, if things go
wrong you don’t want to corrupt your main
menu file. Second, services packs or
updates might overwrite your changes.
Lastly when you upgrade to a new version
(we can all hope) your changes won’t
migrate to the new version.

First, open the CUI interface and click on


the Transfer tab. In the New CUI File pane
on the right side, right click on the item you
want to add. In this case the Toolbars. The
figure on the right shows the options. Use
the New option to create your new toolbar.

6
Once you create the toolbar you can drag items from main menu on the left and drop them into the new
menu. In the figure below the command that is selected in the right I‘ve

In the next Segment


I hope you found some useful information in this segment. In the next segment we’ll cover how to
create custom commands with macros and lisp routines. We’ll also cover some more tips and tricks.

7
ATP254
AutoCAD 102 – Improving Your
AutoCAD Survival Skills
Segment 3

Date: October 26, 2009

Instructor: Kenneth Leary


Level: Beginning
Category: AutoCAD

Web: www.AUGI.com

1
Introduction
Welcome to Segment 3, in this segment we’re going to cover adding macros and lisp routines to your
custom toolbars. We’ll also cover some, always heavily anticipated, tips and tricks that will help super
charge your AutoCAD production speed.

Understanding Macros
Before you can create custom commands you need to learn about Macros. A Macro is very similar to a
script file with the main difference being that macros are contained in the menu, script files are text files
that are kept outside of AutoCAD.

Just like in a script file a macro is a command or string of commands that are written out in a string of
text. There are also a few options that macros have that are. There are several codes you can use in
macros that not available in script files. The list below shows the most common ones.

(a space) A space acts as a return


; Also acts as a return
@ Repeats the last point selected
^M Also acts as a return
\ Pause for user input
/ Used to define directories
^C Cancels command, works like the Esc key
*^C^C Used to make a macro automatically repeat
^ Represents the CTRL key

Good idea: Use semicolons in your macro to represent a Return rather than a space, it’s easier
to count and keep track of.

The macro I’m going to use for our example is a macro that will run the Purge command and purge all
unreferenced items in the drawing. There are two problems that we encounter with this.

The first roadblock is that the Purge command has a dialog box, which won’t work in a macro. This
problem can be fixed by adding a dash (-) in front of the command name. This works at the command
prompt as well and not just with the purge command, most commands with a dialog box will work the
same way. Typing –purge will start the command without a dialog box but that leads to our second
problem.

One of the options of Purge is to purge all nested entities, this option is not available with the command
line version. To fix this we simply have to run the command more than once. Three types usually gets
everything. So first we run the command to see the prompts that we will need to input into the macro.
This is what is we see when we run the command and put in the necessary responses:

2
Command: -purge

Enter type of unused objects to purge


[Blocks/Dimstyles/LAyers/LTypes/Plotstyles/SHapes/textSTyles/Mlinestyles/Tablest
yles/Regapps/All]: A
Enter name(s) to purge <*>: *
Verify each name to be purged? [Yes/No] <Y>: N

From this we can create the macro which would be –Purge a * n. With semicolons instead of spaces
and running the command three times the end result is this –purge;a;*;n;–purge;a;*;n;–purge;a;*;n.

Note: any space represents a Return, make sure you don’t place any extra in your
macro. It’s a common mistake to leave one at the end.

Adding macros to your Custom Toolbars


Open the custom user interface dialog box, select
the Customize tab. Do not make any changes to
the main CUI file. In the Customization In pane use
the pull down menu to select the custom menu file
and make it current. In the Custom User Interface
dialog box in the lower left hand corner Command
List pane, click New.

A new command (automatically named Command1)


is displayed in the Command List pane and the
Properties pane. A blank button image is displayed
in the image pane. The figure on the right shows
the image I selected from the scroll down list. You
can also create a custom icon using the edit button.

In the Properties pane, do the following: In the


Name box, enter a name for the command in this
case Purge All. The name will be displayed as a
tooltip or menu name when you select this
command.

In the Description box, enter a description for the


command. The description will be displayed on the
status bar when the cursor hovers over the menu
item or toolbar button.

In the Macro box, click on the box with three dots in


it, this is highlighted in the figure on the left.

3
Clicking on the box will open the Long String Editor. In this
box you can enter the macro for the command.

In the Element ID box, you can enter an element ID for the


command. This is for new commands only. You cannot
modify the element ID of an existing command.

Once the command is complete you can drag and drop it


from the Command List pane into the toolbar you wish to
place it in, located directly above it in the Customizations In
pane.

You now have a new custom command in your toolbar.

Lisp Routines in custom menus


Lisp routines function much like a script file, they are external files that are brought in to AutoCAD when
needed. A lisp routine can be added to a custom menu with a macro that loads it into AutoCAD. An
example for a lisp routine called “notate” would look like this in the command macro;
^c^c(load “notate”) notate; The

Profiles and Workspaces


You may be confused about profiles and workspaces. If you’re not confused it’s probably because you
haven’t learned about profiles and workspaces yet. Let me try to explain it in a way that won’t require
the use of Tylenol.

Profiles are used more for the “background” settings in AutoCAD. They’re used to store user options,
support paths, and system variables. One of the best benefits to profiles is that they are portable. You
can export the profile to a .arg file and import the file to another computer.

The down side to using profiles is that you have to export the profile and then import it back into
AutoCAD in order to update the changes that you have made. You can’t simply save the changes to it.
You also have to manage your profiles from the Options dialog box, there is no Profile menus or
toolbars.

Workspaces are used to control the things that you see on the screen. They control what menus,
toolbars, and dockable windows are open and where they
are located. When you use or switch a workspace, you
change the display of your drawing area. You can easily
switch to another workspace within a drawing session. This
will allow you to have different toolbars and menus open for
different tasks.

The Workspaces toolbar, pictured on the right, has a pull


down menu that allows you to scroll through the workspace
profiles and set one to current. You can also save the
current configuration as a new workspace. The Customize option will open the CUI editor, which you
may recall from Segment 2.

4
The figure on the left shows the My Workspaces icon. You can
set this to your favorite workspace and switch back to it by
clicking on this button.

The button to the left of the My Workspaces button is the


Workspace Settings button, this opens the Workspace
Settings Dialog box.

In the top of the dialog box is a pull down menu from


which you can choose a workspace to assign to the My
Workspace toolbar button.

The Menu Display and Order controls which


workspace name you want to display in the workspace
toolbar and menu. You can change the order of those
workspaces using the Move up and Move Down
buttons. The Add Seperator button does that it adds a
separator between the workspace names you choose.

You can also set the When Changing Workspaces to


either automatically save changes when you switch
workspaces or to not save changes when you switch to
another workspace.

Tray settings and Status Bar


In the very bottom right hand corner of the AutoCAD window is a
small triangle, clicking on it will open the Status Bar Menu. This
will allow you to turn on or off any of the buttons that appear in the
status bar that runs across the bottom of the AutoCAD window.

The Tray Settings at the bottom of the menu will open the tray
settings dialog box. This will allow you to turn on or off the Display
Icons from Services. In case you don’t speak fluent computer
geek what that that means, translated into English, is you can turn
off the icons in the status bar tray like the Communication Center,
Lock Toolbars and Notification balloons.

5
Being able to change the Notification balloon settings
is a really nice feature. If you have several drawings
open and update a reference file it can be annoying to
have to keep turning off all the balloons that pop up to
tell you the reference drawing was updated.

In the Tray Settings dialog box you can set a Display


time for all notifications so they will turn themselves off
after an amount of time that you can set.

Command Line Window


With AutoCAD 2006, you can now close the Command Line window by choosing the Command Line
option in the Tools menu or hitting Ctrl + 9. The Dymanic Input feature displays command line
information in a tooltip near the cursor so the Command Line window is no longer necessary for most
commands. All commands or input entered while the window is closed, are still captured in the
Command Line window. If for some reason you need to re-open the Command Line window, simply hit
Ctrl + 9 to toggle it back on.

Good Idea: If you don’t want to close it completely instead of closing the window you could
undock it and enable Auto-hide so that it will only expand when you place your cursor over it.

In Conclusion
I hope you found some useful information in this segment. If you want more tips and tricks go to the
AUGI Tips and Tricks forum, there are a lot of great minds coming up with wonderful short cuts in there.

Remember that this is only part of the course, support is always available online in the course forum. I
urge you to go to the visit the course forum and as ask any questions that you may have about this
segment. It’s our mantra that the only stupid question is the one you don’t ask.

Você também pode gostar