Tagged: autocad tutorial

We’re Migrating! (Part I: Exporting)

AutoCAD 2013 will be sweeping the office and magically finding its way onto our hard-drives (or in my case, solid-state drive #upgrade!) in a few days. Training will be held for a few hours and by the end of it all, I’m sure that I will be the only one still excited or willing to use 2013 with any new features. I’m waiting for the “How do you turn this ribbon thing off?!” calls resounding through the office.

I thought this would be a good chance for me to describe some migration techniques that can help anyone through this IT ordeal. I will soon be doing this myself as to not lose the interface I’ve worked so hard on. I already described for you how to create buttons, macros and profiles; so this will build on those concepts. (If you need more detailed descriptions for these items, please see past entries of the AngryCAD blog.)

You’re going to want to save three items. Your profile, (if you using AutoCAD full, not LT… Sorry LT people. ) Your .CUI file (which includes all of your custom toolbars, palates and menus) and your .PGP file (this is where all of your custom aliases are stored).

We’ll start by exporting your custom toolbars and palates in the .CUI file.

  1. Start by tying “CUI” into the command line.
  2. Next, Click on the “Transfer” tab at the top of the window. Now what you should see are (2) frames. The left side represents your current AutoCAD configuration concerning Toolbars, Menus, LISP Routines and anything else you have customized that is shown here. (Be aware that custom aliases are not in this location. We’ll cover how to save those in a minute.) The right side represents a blank file in which you are to fill up with your customization items that you wish to save. It should look something like this:
  3. I’ll illustrate how to export your custom toolbars, and you should be able to translate that knowledge into exporting other items.
  4. Expand “Toolbars” in the left hand pane by clicking the + sign.
  5. Find the toolbars that you intend to export. Then, click and drag them to the “Toolbars” heading on the right hand pane. You should now see it where you dropped it.
  6. Once you have moved all of your custom items, click the save icon in the right hand corner of the right hand pane and save it to your safe space. (Make sure IT isn’t clearing your HD or giving you a new machine, because saving it on your HD won’t work if this is the case. Find a flash drive or use a personal network folder, if you have one and save your .CUI file there.)
  7. Now that your .CUI is safe, we’ll focus on some other aspects of migrating.

Lets move on to your profile, which is much easier.

  1. Type “OPTIONS” into the command line.
  2. Click on the tab named “Profiles”.
  3. Next, click the export button on the right hand side and save it to your safe space.
  4. Click “OK” then close the options window.
  5. That’s it for now. We’ll import it when you get the shiny new version.

Lastly is your .pgp file. 

If you have any custom aliases defined, this is where they are stored. (I’ll write a future blurb on this to explain more in depth, but for now you’ll most likely know if you have modifications here that you will need to save.) Aliases are shortened keyboard entries that execute commands. For example; by typing “CO” into the command line, it will execute the Copy command. Now, a lot of users don’t like “CO” as the alias for this command because it’s not executable with one hand. I see a lot of users change it to “CC” instead. As I said, I’ll touch more on the .pgp file later on. Let’s make sure we save it today.

  1. Click “Tools”, “Customize” then “Edit Program Parameters (acad.pgp)” The window that comes up should look like this:
  2. Simply click “File” and “Save As…” and save it to your safe space with your .cui and .agp files.
  3. Close everything, there is no need to save if it asks. (unless you modified anything.)

Now everything should be saved! Unless you are using .lsp files or scripts, everything should be saved. If you are using LISP’s or scripts, simply copy them from the AutoCAD support directory to your safe space. Simple as that.

Contact me with any questions about anything you see here!

 

Anger clouds the mind. – Master Splinter

…. and your AutoCAD drawings.

Enjoy the day.

My Favorite AutoCAD Macros

As promised, here are a few of my macros that I use on a daily basis. Steal these ones, or devise your own for yourself!

  • Horizontal Construction Line:  ^C^C_XLINE;H;

Creates a horizontal extension line at infinite length for construction.

  • Vertical Construction Line: ^C^C_XLINE;V;

Creates a vertical extension line at infinite length for construction.

  • Create Polyline: ^C^C_PE;\;J;

Enters polyline edit command and automatically enters the join option.

  • Lock Viewports: ^C^C_-VPORTS;LOCK;ON;ALL;;

Locks all viewports on the current layout tab.

  • Un-Lock Viewports:  ^C^C_-VPORTS;LOCK;OFF;ALL;;

Un-locks all viewports on the current layout tab.

I use a layer called “Construction” where I make a lot of chicken scratch, notes and model space dimensions. Usually when I’m done I like to freeze this layer; or when I need this layer on and off quickly for visualization, this is the button I use:

  • Freeze Constructions: ^C^C_-LAYER;SET;0;FREEZE;CONSTRUCTION;;

Freezes the construction layer and sets the current layer as “0”.

  • Thaw Constructions: ^C^C_-LAYER;SET;0;THAW;CONSTRUCTION;;

Thaws the construction layer and sets the current layer as “0”.

I continually need to insert blocks from a common network directory throughout my day. The following button lets me simply type the name of the block into the command line and it will insert. If you are to make a button like this, you will need to add the folder directory in which the block comes from to your “Support File Search Path” and “Working Support File Search Path”. To do this, follow these instructions:

  1. Click “File” then “Options” or simply type options into the command line.
  2. Click the “Files” tab and click the small + sign next to the top two items so your window looks like this:

  1. Click on the text of “Support File Search Path” so that it is highlighted and click the ”Add…” button on the right.
  2. Now, you will need to browse to the folder of your intended block directory.
  3. Click on the text of “Working File Search Path” and follow the same process.
  4. Click Apply and Close.

My code reflects a “B” that automatically enters due to the fact that the name of every block in this directory starts with “B”. I don’t want to have to type it every time.

  • Insert Shape: ^C^C_-INSERT;B\;\;1;1;0;

Definitions of symbols:

; – I defined the semi-colon in the last post as being equivalent to hitting enter or the space bar.

– – A dash was also defined in the last post as the indicator that prevents a window from appearing for a command that would normally launch one.

\ – backslash is a new one. This is a “pause for user input” signifier. In my last example, you see two of them used. The first is to let me type in my extrusion number (block name), and the second lets me place it where I need to on screen with a click.

Some of the examples here, as you can probably tell, are pretty specialized. This is how you should be using this method! My examples are to simply show you how the tool works, now you need to think about what your daily time wasters are and create something that can help you through it.

I also wanted to note that when making an image for your button you can browse to an image that you have downloaded or pulled from somewhere else.  I know that I am not an artist and have trouble concocting a suitable image that will convey the intent of the command activated by the button, so this is what I do!

 

Anger clouds the mind. – Master Splinter

…. and your AutoCAD drawings.

Enjoy the day.

You’re Typing Way Too Much… Use Macros! (Creating Custom Toolbars & Buttons)

This one is a twofer. First will be a quick lesson on creating a custom toolbar with buttons along with a shnazy image (so you remember what it does), as well as a “how to” on creating a macro to save steps whilst going through your commands.

I sit next a very loud typist. He’s a designer and uses AutoCAD daily. Some days (most days) it sounds like he is working on his next best selling novel that will hit bookstore shelves in two weeks and he’s struggling to meet his publisher’s deadline. He’s really just using AutoCAD, and killing his keyboard in the process. Save your keyboard! Save your mouse! Save your neighbors, for goodness sake! Exaggeration intended…

Many commands have a lengthy string of additional options inside the initial command which must either be typed into the command line, or clicked through in menus. A lot of times you’re repeating the commands you use throughout the day and many of these commands are multi-entry commands. Case and point – Fillet. Most of us don’t just fillet one item at a time. So, we enter the fillet command, then type the command for MULTIPLE. (It’s a different key in different releases. From here on, I will be using “M” for multiple in this example.) This is really an extra step in your day and a button could be created for this operation. The macro you would assign to your “Fillet Multiple” button would be ^C^C_FILLET;M;. This is a very simple and minor example and I’ll dissect this code later on in the post, but the operation would be one click of a button from now on.

Just to simplify my statement above and give it a definition; A macro is the equivalent of typing commands into the command line, Which, coincidentally, is the best way to preliminarily construct and troubleshoot your custom macros.

First, we’ll create a new toolbar. (Please note that this method will be for releases of AutoCAD 2006 and later using the .cui file.)

  1. Simply type “CUI” into the command line. It should look like this:

  1. In the top left pane (Customizations in All CUI Files), click the plus sign to expand “Toolbars”.
  2. Right Click on the text that says “Toolbars” and then click “New Toolbar”. Congrats. You have just created your very own toolbar.
  3. In the right pane (Properties), you will see all of the data about your new toolbar. Click in the “Name” section under “General” and call it what you will. You can also add a description here if you like, but most of the other properties I don’t typically mess with.

Next we’ll create the custom button.

  1. From the CUI window, Check out the bottom left pane (Command List).
  2. Click the button that looks like a shiny star. (The “star” button on the right.) If you hover over this one, it will say “Create a new command”. This is what we want to do.
  3. “Command1” has now appeared in the “Command List” area and your “Properties” on the right have changed as well. We’re going to start simple and create the Fillet Multiple command.
  4. Click in the name section and type “Fillet Multiple”.
  5. Click in the description section and type “Enters Fillet Command for Multiple Instances” You can make this whatever you want. It’s just to remind you of what the command is if you have a large amount of custom buttons.
  6. Lastly, click in the macro section. After the ^C^C, add: _FILLET;M; So the entire macro should read: ^C^C_FILLET;M;
  7. In the top right pane (Button Image), scroll through the images to find the image for Fillet and click on it.
  8. Next, click the edit button and scribe an “M” in the empty space using the line or pencil tool. This will differentiate your modified fillet from the standard fillet. Click “Save” when you’re done.
  9. Click “Apply” at the bottom of the window. Then click “OK”.

If your new toolbar is not floating in space, right click on any button you like and find your toolbar in the list. Click it and now it will be floating in front of your face and you can drag it and dock it wherever you like. Be sure that each time you add a new toolbar or modify an existing toolbar, afterwards export your template. This will update it with your current interface.

Here is what some of the general functions of the macros are:

“-“ – A dash before any command will eliminate a window opening. You can then navigate using text commands instead of click. This is the way to make macros for certain commands. For example, PURGE or XREF.

“;” – Semicolon is the equivalent of hitting enter or the spacebar.

“^C” – Carrot and “C” is “CANCEL”, or the equivalent of hitting Escape. It’s a good idea to place this at the beginning of all macros just to clear the command line.

Remind me to outline the process of exporting your toolbars in case you’re re-formatting or something similar where AutoCAD gets uninstalled. It’s a little lengthy and not really applicable quite yet.

Have fun with these, experiment and don’t hesitate to leave feedback or ask questions in the comment thread below. I will respond! My next post will be a list of my favorite, time saving macros that I use on a daily basis and one’s I have created in an effort to reduce my department’s redundant tasks.

Anger clouds the mind.

…. and your AutoCAD drawings.

Enjoy the day.

Get a Head Start… Make a Template!

Do you insert the same items into every drawing you make? Feels like a waste of time, right? Well it is! creating a template containing all of the standard tools that you will need to dig into your newest project. If you’re a production drafter, you probably deal with a lot of the same over and over again. Most of the time each drawing will have its own twists, but things like title block, stamps, dimension styles and custom blocks can all be housed inside of a template file. So, let’s create a basic .dwt file.

  1. Start a new drawing using the acad.dwt template file.
  2. Immediately click “File” then “Save As…”. From here, browse to your safe space and then change the file type at the bottom of the window to “.dwt” instead of “.dwg”.
  3. Now add the following: Borders to Layout tabs, Commonly used blocks, Dimensions (copy from a previous drawing with styles that you currently use), and text copied similarly to how you imported dimension styles.
  4. Once you add these dimensions and pieces of text, you can delete them. The styles will stay inside the .dwt file.
  5. Copy and rename as many Layout tabs as you need.
  6. Save this file when you have everything you typically need.

Now, each time your click File… New to start your new drawing, you can use what you just created and stop slamming your head into your desk to numb the pain of your redundant practices. Everything that you need is already there!

These are just suggestions about what you may need. I use most of these, and more. Feel free to send me questions or comments about anything you find particularly useful in your creations. Here is a link one template I use for freelance work. It contains blocks using attributes, and dynamic blocks as well. These are topics that will be covered in future posts.

Anger clouds the mind.

…. and your AutoCAD drawings.

Enjoy the day.

https://dl.dropbox.com/u/55276129/Template%201.0.dwt <—- Address for sample template if link will not work for you.

Create a Profile!

You know those people in your office who get angry when I.T. comes around every year or three and wants to update their version of AutoCAD? First of all… DON’T BE ONE OF THEM! You’re getting a tool that could greatly increase your productivity and could potentially make life easier. See it as an opportunity to learn something new, not a hindrance to your daily productivity. Learn and try new things with your career path; Don’t ever remain stagnant.

Now to my point. One of the reasons the old geezers (or younglings with old brains) get angry about updates is because this means they will lose all of their buttons, toolbars, toolbar layouts, palates and AutoCAD system settings. As the title of this post indicates, there is an easy way to subvert this loss. Create a profile. So, shall we?

  1. Open a new drawing or a current one that you’re working on. It doesn’t really matter. A file must be open to create a profile.
  2. Make sure all of your toolbars are where you want them so that you feel safe and cozy in your AutoCAD environment.
  3. Do one of the following: Right Click and go to “Options”, Click “Tools” then “Options” from the drop downs next to File, Edit & View, or type the word “OPTIONS” into the command line. By your choice here, you can tell how many years CAD has been in your blood.
  4. From the options window, click the tab named “Profiles” at the right.
  5. Click the “Export” button on the right to name and save your new profile wherever you like.
  6. From here you can click “Apply” and “OK” at the bottom of the window.

Now anytime those pesky I.T. guys come and update your system in any way that wipes out your AutoCAD, simply follow the same procedure outlined above and click “Import” instead of “Export” and browse to your safe space where you decided to cage up your profile. Set current when you’re finished and you’re back to normal!

 

Anger clouds the mind.

…. and your AutoCAD drawings.

Enjoy the day.