Tag Archives: Tip

Filling the holes in Autodesk’s CHM Help stopgap

It was good to see Autodesk react to criticism of AutoCAD 2011’s browser-based Help with an acknowledgement of the problems and an attempt to provide a workaround by making a zip file of CHM files available for download. That’s much better than ignoring people’s concerns, denying the validity of those concerns or shooting the messenger, which has been known to happen in the past.

However, there are some holes in the workaround, only some of which can be filled.

  • Under 64-bit Windows 7, the Search pane is blank, as it is in the CHM Help for earlier releases on that platform. This is stated on the download page. Index works well, but Search doesn’t. As Search is one of the worst aspects of the browser-based Help, this is a rather unfortunate.
  • There is no obvious way of making the CHMs provide contextual help. Don’t bother pointing at acad181.chm in the Files tab of Options, it doesn’t work. Edit: See Chris Cowgill’s post on the AUGI forums for a partial workaround.
  • Even without contextual help, no advice is provided for calling the CHMs from within AutoCAD; you are only told that you can set up a shortcut on your desktop and double-click on that when you need it. However, you can set up an alias command in AutoCAD. To do this, edit the acad.pgp file or use the Express Tools Aliasedit command to set up a shell command. The alias name can be whatever you like (e.g. HEL), the command name should simply be the path and filename of the main acad181.chm file.
  • The CHM files are currently available only in English.
  • The set of CHM files is incomplete. See below for more details and what you can do about it.

These are the CHM files provided with AutoCAD 2011:

acet.chm – Express Tools
AdRefMan.chm – Autodesk Reference Manager
adrefmanctxt.chm – Not to be launched manually
ole_err.chm – Not to be launched manually
webbrw.chm – Not to be launched manually

These are the CHM files provided in the zip file download:

acad181.chm – Main AutoCAD 2011 Help file
acad.readme.chm – Readme
acad_acg.chm – Customization Guide
acad_acr.chm – Command Reference
acad_aug.chm – User’s Guide
acad_dpg.chm – Driver and Peripheral Guide
acad_install.chm – Installation
acad_nfw.chm – New Features Workshop
adsk_lic.chm – Licensing

These are the CHM files that are missing:

acad_aag.chm – ActiveX and VBA Developer’s Guide
acad_alg.chm – AutoLISP Developer’s Guide
acad_alr.chm – AutoLISP Functions
acad_alt.chm – AutoLISP Tutorial
acad_car.chm – Connectivity Automation Reference
acad_dev181.chm – Developer Documentation
acad_dxf.chm – DXF Reference
acad_sso.chm – Sheet Set Objects Reference
acadauto.chm – ActiveX and VBA Reference
adsk_brw.chm – Licensing – (this appears to be a later version of adsk_lic.chm).

Do you need any of the above? I did. To obtain a full set of AutoCAD 2011 CHM files, I had to do the following:

  1. Download a vertical AutoCAD 2011-based variant. I used AutoCAD Civil 3D 2011, because I am entitled to download that from the Subscription Center. You may need to download an evaluation copy of a vertical. If so, make sure you delete the files after your evaluation period of 30 days, won’t you? Hopefully, Autodesk will have provided a better workaround by then.
  2. Double-click on the downloaded executable (which is actually a self-extracting archive). You will be prompted for a location for the files to be unzipped to. I accepted the default of C:\Autodesk\AutoCAD_Civil3D_2011_English_32bit.
  3. After the unzipping process is complete, the installtion window will appear. Pick Exit; you do not need to go ahead with the whole installation.
  4. Search for the CHM files in the unzip location. There are a variety of locations, some of them containing duplicate files, but I was able to find what I needed in C:\Autodesk\AutoCAD_Civil3D_2011_English_32bit\x86\en-US\C3D\Acad\Help.
  5. Copy the files from here to a safe location, and set up shortcuts and/or alias commands to access them.

Note that I can’t vouch for the completeness or correctness of these files (which may be why Autodesk didn’t include them), but I can’t do that for the HTML versions either. For those of you in non-English-speaking locations, I would be interested in finding out if you can use this method to obtain non-English CHM files. Are there non-English AutoCAD 2011-based verticals available for download yet? If so, are the CHMs in your language?

Finally, if you are having trouble reading CHMs over a network, check out this Microsoft document on a security update that may be the cause.

AutoCAD 2011 – Putting things back to “normal”

Edit: If you’re running a more recent release of AutoCAD, have a look at the post AutoCAD 2017 – Putting things back to “normal” instead.

Easily the most popular post on this blog, in terms of both hits and comments, is AutoCAD 2009 – Putting things back to “normal”. Not too far behind it is AutoCAD 2010 – Putting things back to “normal”. Apparently, lots of people find these posts useful, so here’s an updated version for the latest release. Some of this post is based on the originals, but there are significant additions and differences in this year’s Luddite post.

Note: there is an updated version of this post for AutoCAD 2012.

One thing that’s regularly asked whenever a new AutoCAD release hits the streets is how to make it work like earlier releases. As I stated in my original post, I think you should give any new features a fighting chance before turning them off or ignoring them. But it’s entirely your choice. We should be grateful that in AutoCAD 2011 at least (unlike some Autodesk products), you do still have that choice.

Let’s assume you’ve made the decision to put your environment back to AutoCAD 2008 or earlier; how do you do it?

  • Workspace. In vanilla AutoCAD, you can restore much of the user interface by just switching workspaces. The main Workspace control is now located near the top right corner. If you have turned this off (right-click, Remove from Quick Access Toolbar) or if you just prefer working with interface elements in the same place year by year, there is another Workspace control in the bottom right corner. This is a little button that looks like a gearwheel. Every odd-numbered release seems to have the current workspace name missing from this button, so this year we miss out. If you want the name, this year you need to look in the QAT. In either case, click on the Workspace control and pick the item called AutoCAD Classic. This will perform some of the steps described below, but not all of them, so I suggest you read on. If you’re using a vertical variant of AutoCAD 2011, this workspace may not be available, so you’ll need to make your own by manually setting up your interface the way you like it, then saving it as a Workspace using the Save Current As… option under one of the Workspace controls.
  • Ribbon. You can close the Ribbon with the RibbonClose command. If you ever want to turn it back on, enter Ribbon.
  • Dashboard. The AutoCAD 2007/8 Dashboard is gone, but you can have a vertical Ribbon instead. If the Ribbon is not visible (it won’t be if you just selected the AutoCAD Classic workspace), enter Riboon to bring it back. In the tab title row (the bar with the word Home in it), right-click and pick Undock. Now you can place and size your Dashboard-like thing as you see fit. As before, you can right-click on things to change the various settings. However, getting the contents exactly the way you want it usually involves using CUI, and that’s well outside the scope of this post.
  • NavBar. If you like the new NavBar feature as much as I do, you’ll want to turn it off. You can close it easily using the little X in its top left corner. Alternatively, control it with the NAVBARDISPLAY system variable (0 for off, 1 for on)
  • ViewCube. I like the ViewCube concept, and I think it’s a great piece of interface design. But not everybody agrees. It has caused performance issues and it’s not very useful for 2D users. If you want it gone, that’s a surprisingly difficult thing to find out about. It’s controlled using the Options command, in the 3D Modeling tab, in the bottom left corner. Turn off those toggles that don’t make sense for you. There is a related set of system variables called NAVVCUBExxx.
  • UCS Icon. Don’t like the new simplified UCS icon? Sorry! While you can use the UCSIcon command’s Properties option to change the appearance of the icon in various ways, there’s nothing to restore the UCS Icon’s appearance from previous releases with its little arrows pointing the way. This information isn’t totally useless, because at least it will save you the time and effort involved in finding this out for yourself.
  • Help. Unless you want your Help to work with the speed of a long-dead slug that has been nailed to a hefty piece of wood, you will want to turn off AutoCAD 2011’s online help. Go into Options again, this time in the System tab, then look in the bottom right pane to turn off the Use online help toggle. Even with online help turned off, you’re stuck with the unfortunate new browser-based Help interface. While you’re looking there, you may also wish to turn off AutoCAD’s insistence on firing up Internet Explorer, that is if you dislike IE or have security concerns.
  • Pull-down Menus. Enter MENUBAR 1 to turn pull-down menus on. To turn them off again, enter MENUBAR 0.
  • Toolbars. In AutoCAD 2009, you could turn individual toolbars on and off by accessing a menu obtained by right-clicking on the QAT. Autodesk rather nastily removed that option in 2010, and it’s still gone in 2011. That menu is still available if you right-click in an unused docked toolbar area, but if you have no toolbars visible there will be no such area available. What to do? Turn on one toolbar at the Command prompt, then you will be able to access the menu by right-clicking on the blank area to the right of it. The following command sequence will do it:
    _.-TOOLBAR ACAD.Standard _Top 0,0
    Paste this into AutoCAD’s command line area and the Standard toolbar will be turned on above your drawing area. This will leave a grey area to the right that you can right-click into. The other toolbars will be in sub-menus under that, with the main set of default ones in the AutoCAD section. Note that this will only work if you have the acad.cuix file loaded (or partially loaded). This is the case in vanilla AutoCAD and some verticals, but it may not be the case in other verticals. As I don’t have access to such verticals, I’m afraid I can’t offer much advice here.
  • Graphic Background. Autodesk has half-listened to users’ pleas for a black background by giving you a nearly black one (RGB 33,40,48 rather than 0,0,0), in model space only. Many of you will want a real black background to provide better contrast. To do this, invoke the Options command (right-click on the drawing area and pick Options… or just enter OP), then pick the Display tab. Don’t be tempted to choose Color Scheme and set it to Dark, because that just changes the appearance of various user interface elements. Instead, pick the Colors… button. This will put you in the Drawing Window Colors dialogue box. On the left, choose a context you want to change (e.g. 2D model space), choose the appropriate background element (e.g. Uniform background) and choose the particular shade that takes your fancy. There is a Restore Classic Colors button, but that only takes you back to AutoCAD 2008 with its black model and white paper space. If you want a black paper space background too, you’ll have to pick the Sheet / layout context and specify that individually. When you’re done, pick Apply & Close, then OK.
  • Crosshairs. Want 100% crosshairs? Many people do. As before, use the Options command’s Display tab and look towards the bottom right, or use the CURSORSIZE system variable.
  • Status bar. Right-click on a status bar button, turn off Use Icons and your old text-based status bar buttons will return. If you have no use for some of the new status bar toggles, right-click on one, pick Display, then turn off what you don’t need.
  • Grid. I much prefer the new line-based grid. If you don’t, right-click on the Grid status button and pick Settings…, which will take you into the Drafting Settings dialogue box, which you can also get at with the DSettings command, or DS for short. In the Snap and Grid tab, the grid is controlled by the options on the right. If you want your dots back, turn on the toggles in the Grid style section. This can also be done using the GRIDSTYLE system variable. If you don’t like the fact that the grid is now on by default in new drawings, this is set on a drawing-by-drawing basis and is therefore controlled by your template drawings. If you use AutoCAD’s supplied templates, you will need to open them individually and turn off the grid in each one.
  • Dynamic Input. If Dynamic Input slows you down, you can turn it off with the status bar toggle or F12. If you like the general idea but don’t like some parts of it, there are lots of options available in the Dynamic Input tab of the DSettings command to enable you to control it to a fine degree. You can also get at this by right-clicking the Dynamic Input status bar button and picking Settings… As an example of the sort of thing you might do in there, the default of using relative coordinates is difficult for long-termers to get used to. To turn it off, pick the Settings… button in the Pointer Input panel, pick Absolute coordinates, then OK twice. There are a whole range of DYNxxx system variables for controlling this stuff.
  • Xref fading. Don’t like your xrefs looking different? Use the Options command’s Display tab and look at the Xref display slider on the bottom right, or use the XDWGFADECTL system variable.
  • Selection. Selection Preview annoys some users, adding as it does an unfortunate degree of stickiness and working inaccurately when Snap is in use. This is controlled in the Selection tab of the Options command. Turn off the toggles in the Selection preview panel on the left (these control the SELECTIONPREVIEW system variable). If you dislike the coloured boxes you get while doing a Window or Crossing, pick the Visual Effect Settings… button and turn off the Indicate selection area toggle. This controls the SELECTIONAREA system variable.
  • Hatch dialog box. If you want the Ribbon on but prefer the old Hatch dialog box, set HPDLGMODE to 1.
  • Hatch double-click. If you’re not using the new Ribbon-based hatch editing feature, you will probably want to invoke the HatchEdit command when you double-click on a hatch object. Doing this involves braving the CUI interface, but I have gone into step-by-step detail of that process here. In short, you need to drag and drop the Hatch Edit command from the bottom left CUI panel onto the double-click action for Hatch in the top left panel, replacing the default action (Properties).
  • Classic commands. If you prefer not to leave the various new palettes on screen all the time, old versions of various commands are still available: ClassicLayer, ClassicXref and ClassicImage. (Autodesk has deprecated these commands in 2011, which I think is a really bad idea). There is also a system variable LAYERDLGMODE, which when set to 0 will make the Layer command work in the old (and faster) modal way. If you use this setting, you can still access the new modeless layer palette with the LayerPalette command. Going back further, there are command-line methods of using these commands: -Layer, -Xref, XAttach, -Image and ImageAttach.

If you have allowed AutoCAD to migrate your settings (I never do), some of the above will already be done for you, but by no means all of it. If past experience is anything to go by, the job done by Migration will probably be imperfect.

Once you’re happy with your new environment, I suggest you save your workspace under a name of your choosing (Save Current As… under a Workspace control), then export your profile in the Options command’s Profiles tab. Keep a safe copy of both your exported profile and your main CUIX file (acad.cuix by default), because that is where new workspaces are stored.

Let me just end by saying that Autodesk generally does an excellent job of keeping long-term AutoCAD users happy by allowing them to keep working in the way that they prefer. There are exceptions, but conservative users are much better off with new releases of AutoCAD than they are with, say, Microsoft Word.

AutoCAD tip – which drawings use an xref?

Here’s a tip I just rediscovered while cleaning out my old emails. It applies to all recent AutoCAD releases.

Let’s say you have a drawing that you think has been used as an xref by at least one other drawing, and maybe more. How can you find out which drawings use it as an xref?

First, turn on DesignCenter. You can do this with Tools > Palettes > DesignCenter, the ADCENTER command, or Ctrl+2. Pick on the Search button at the top (the magnifying glass thingy). In the Search dialogue box, change the “Look for” item to Xrefs (but have a look at what else you can search for, you may find that useful too). You can pick Browse to tell it where to look, and you can make it look down into all the subfolders if you like. Type the xref name into the “Search for the name” field and pick Search Now.

DesignCenter has lots of handy features, such as the ability to drag a block from one drawing to your current drawing without opening the drawing containing the block. Some of the features are hard to find (like the xref search above), but they are very useful once you know about them.

Another handy tool for obtaining all sorts of information about xrefs is the Reference Manager, which was introduced in AutoCAD 2004. This is a standalone program, for which you can find a shortcut in the same Start > Programs > Autodesk > AutoCAD 200x menu as AutoCAD itself. There’s too much good stuff in there to cover in a post like this, but many people are unaware that it exists and I just want to raise awareness. For details, please check out the Help from within Reference Manager itself.

Note
I sent most of the above tip to the users I support in June 2006. I was asked about how to do this by one of my users and found out about it somehow or other, but I now can’t remember how I found out. I may have read about it somewhere on the Internet, but I just don’t know. I have searched and found a similar tip in various places (including Cadalyst and Ellen Finkelstein’s blog) but have not yet seen one that is dated before I wrote about it myself. If you think you know of someone who deserves credit for earlier publication of this tip, please let me know.

Edit: It now appears quite likely that credit belongs to Mai Ezzat, via Ellen Finkelstein, possibly via R.K. McSwain.

Repost – how to get your picture next to your comment

This is a revisit of a post I made about a year ago.

You may have noticed that some people’s comments have an avatar picture next to them (no, not the film with the Roger Dean visuals), while others have a randomly assigned pattern. On this blog, the avatar picture is a gravatar (globally recognised avatar), and you can have one too. Once you set it up, you will find that it works in all sorts of places, not just this blog. Some other blogs may use other avatar standards, though.

Here’s how to do it:

  1. Visit gravatar.com and pick a sign up link.
  2. Provide a valid email address; the same one you provide when adding comments to blogs. I have not received any spam as a result of doing this, which is no surprise because Gravatar is owned by Automattic, Inc., the highly reputable WordPress people.
  3. You’ll be sent a confirmation email; click on the link in that and follow the prompts to set your password and so on.
  4. Choose your gravatar image from your hard drive, the internet, a webcam or a previously uploaded image. You can point to any size photo and will be prompted to select a cropped square area to display.

That’s it, although you can manage your account to provide multiple email addresses and images if you wish. Wait 5 or 10 minutes, then check out this or other blogs and web locations where you have made comments in the past. Those blogs with layouts that support gravatars should now display the picture that you associated with the email address you supplied when you made your comment. If the image doesn’t show up, do a reload/refresh and/or clear your browser’s cache and try again.

Quick and dirty clicks and drags in AutoCAD

I’m sure most of you draw your objects with great precision. But sometimes even the most precise among us may want to make a quick and dirty move or copy of some drawing objects and are not too bothered about the exact place they end up. Text, for example.

As always in AutoCAD, there are many ways of doing this. Long-termers like me may automatically gravitate towards the short-form commands for Move and Copy, but there are various alternatives.

In this post I’m going to cover the click-and-drag method. This isn’t grip editing; although you will see grips appear when you select the objects, you’re not going to use them. To move an object this way requires just two clicks and no commands. Admittedly, one of the clicks is a long one and you also need to move the mouse and then release one of the clicks, but it’s still pretty efficient.

Move
1. Left-click the objects to preselect them.
2. Long left-click on one of the selected objects (not on a grip) to initiate the drag process.
3. Move the cursor to the desired location and release the left button to drop the objects there.

Copy
1. Left-click the objects to preselect them.
2. Long left-click on one of the selected objects (not on a grip) to initiate the drag process.
3. Once you have the little rectangle glyph on the cursor, hold down Ctrl to change the mode from move to copy. A little [+] symbol will be added to the cursor.
4. Move the cursor to the desired location and release the left button to drop the objects there. Release the Ctrl key.

Alternative method
1. Left-click the objects to preselect them.
2. Long right-click on one of the selected objects (not on a grip) to initiate the drag process.
3. Move the cursor to the desired location and release the right button to drop the objects there.
4. Left-click Copy here or Move here on the cursor menu that appears.

This method works in all recent AutoCAD releases and vertical variants. The above description assumes that your AutoCAD settings have been left in their default state.

AutoCAD does a Cheshire Cat

In Alice’s Adventures in Wonderland, the Cheshire Cat gradually disappears until nothing is left but its smile. The AutoCAD packaging has done the same thing over the years until now nothing is left but the 0s and 1s. In Release 13, one box was not enough to keep all the materials, but Autodesk gradually slimmed it down until in recent years your slab of upgrade or Subscription cash gets you nothing but a DVD in a case (with or without a pack of cards). However, you can go cap in hand to Autodesk and ask for a real manual of your choice, which will be shipped to you free of charge.

A few days ago, Subscription customers in 37 countries were all automatically opted in to a download-only upgrade mechanism for all Autodesk software, not just AutoCAD. Here are Autodesk’s stated reasons:

  • Convenience—It’s more convenient than installing software from a DVD or CD and is available 24 hours a day.
  • Sustainability—Because there’s no printing, packaging, or shipping, it’s a more sustainable choice.
  • Central control—Software Coordinators can provide users with electronic access to upgrades and manage software permissions centrally.

So this has nothing to do with increasing Autodesk’s profit margins, it is for your benefit and to help save the planet; that’s nice to know. However, depending on your circumstances and the available bandwidth at both your end and Autodesk’s, downloading a couple of GB or so for each product (double it if you need both 32 and 64 bit versions) may not be convenient. If you want to receive an actual disc containing the software, you will need to change a Subscription setting. You should have seen an email about this containing a convenient link to a page containing that setting.

If you haven’t taken care of this yet, I suggest you log on to the Subscription site, edit your Subscription Center Profile (click on My Profile in the top right) and change the Delivery Preference setting to Box. If there are multiple contact people on your Subscription contract, I suggest you ask your colleagues (particularly the person designated to be the Contract Manager) to do likewise. Having a box shipped to you does not prevent you from downloading the software. I suggest you do this sooner rather than later, because if you leave it until less than a week before the next release (historically mid-March), you’ll miss out.

AutoCAD virus protection update

As I mentioned in my last post, I had some reservations about the code provided by Autodesk to deal with suspect acad.vlx and logo.gif files. Based on a suggestion from Jimmy Bergmark, I have written my own, safer version which you can download here: clean_virus_safe.lsp.

The comments at the top of the clean_virus_safe.lsp file explain what to do with it, but I will reproduce some of the relevant points here.

  • Purpose: Checks for existence of acad.vlx and logo.gif files, which are associated with virus AL/Logo-A, also known as ACAD/Unexplode, ACAD/Agent.A or ACM_UNEXPLODE.B. Written as a safer alternative to Autodesk’s code which deletes suspect files without prior warning. This code renames the files instead.
  • Legal: Provided as-is with no warranty whatsoever, use at own risk. May be distributed freely.
  • Usage: Append the contents of this file into a startup LISP file (e.g. acaddoc.lsp in your search path – create such a file if it does not exist). Autodesk’s suggestion to modify the acad20xx.lsp file should not be followed: this is bad practice. The acad20xx.lsp file is Autodesk’s file and any modifications you make to it are likely to be lost when updates and patches are applied.
  • Effects: Any and all files named acad.vlx and logo.gif and located in AutoCAD’s search path will be renamed, e.g. “acad.vlx” will become “[Suspected Virus] acad.vlx0”. The name will end in a number starting with 0. If other suspect files are later found in the same location, those files will be renamed to end with 1, 2, 3 and so on.

I don’t have a copy of the actual virus, and would like to get hold of one with a view to possibly improving this code. If you have a copy, I would be grateful if you could contact me so I can dissect it.

Another AutoCAD malware warning

Shaan Hurley has posted some useful information about another AutoCAD-based virus that is doing the rounds, and I strongly suggest you read it. However, I have some reservations about the solution that is posted there and in the Autodesk knowledgebase.

The LISP code suggested will delete any files called acad.vlx or logo.gif that are located in the current user’s current AutoCAD search path. There are a couple of problems with that.

  • The search path will change depending on the user, the profile, the startup folder and the drawing folder. That means you can’t just use the code once and expect the problem to go away; the code will need to remain in place permanently to ensure it does not recur. That may not be a huge problem, although it will have a performance penalty (particularly where the search path is long and/or includes network paths) and it is one more thing to remember to carry over to future releases.
  • More importantly, the code has no idea if the files it is deleting are legitimate or not. It is quite possible for a custom environment or third-party utility to make use of a file called acad.vlx, and there are all sorts of reasons you may have a logo.gif file floating around. The Autodesk code will just erase such files without prior warning, which is a bit naughty.

I commend Shaan and Autodesk for posting this information and proposed solution. However, I recommend caution before using this code as suggested. Check with your CAD Manager (if you have one) first to ensure there are no legitimate acad.vlx files in your environment. Do a search for these files yourself and see if there is a legitimate reason for them being where they are.

As with most malware attacks, taking care with incoming files is a very important part of the solution. Don’t just blindly use the contents of a zip file full of drawings, even from a trusted source. If somebody sends you a zip file containing an acad.vlx file, let the sender know about the problem and ask for an uninfected set of files.

AutoCAD malware warning

There is a piece of malware out there written as an ObjectARX application, i.e. it will only affect AutoCAD users. It’s a China-based adware client, which Andrew Brandt at the Webroot threat blog has named Trojan-Pigrig. For full details, see here. Also, see here for AutoCAD-specific advice from the AutoCAD support team at the Without a Net blog.

AutoCAD 2010 – Putting things back to “normal”

Edit: If you’re running a more recent release of AutoCAD, have a look at the post AutoCAD 2017 – Putting things back to “normal” instead.

Easily the most popular post on this blog, in terms of both hits and comments, is AutoCAD 2009 – Putting things back to “normal”. Lots of people seemed to find it useful, so I guess it’s worth doing an updated sequel for the current release. Much of this post is the same as the original, but there are differences.

Note: there are updated versions of this post for AutoCAD 2011 and 2012.

One thing that’s regularly asked whenever a new AutoCAD release hits the streets is how to make it work like earlier releases. As I stated in my original post, I think you should give any new features a fighting chance before turning them off or ignoring them. The 2010 Ribbon is still a Ribbon, but in my view it’s a better one than in 2009. But it’s entirely your choice. We should be grateful that in AutoCAD 2010 at least (unlike Revit 2010), you do still have that choice.

Let’s assume you’ve made the decision to put your environment back to AutoCAD 2008 or earlier; how do you do it?

  • Workspace. In vanilla AutoCAD, you can restore much of the user interface by just switching workspaces. In the bottom right corner, there is a little button that looks like a gearwheel. This is the Workspace control. Click on it and pick the item called AutoCAD Classic. If you’re using a vertical variant of AutoCAD 2010, this workspace may not be available. If so, or if you want finer control over your interface, read on.
  • Pull-down Menus. Enter MENUBAR 1 to turn pull-down menus on. To turn them off again, enter MENUBAR 0.
  • Toolbars. In AutoCAD 2009, you could turn individual toolbars on and off by accessing a menu obtained by right-clicking on the QAT. Autodesk (vindictively?) removed that option in 2010. That menu is still available if you right-click in an unused docked toolbar area, but if you have no toolbars visible there will be no such area available. What to do? Turn on one toolbar at the Command prompt, then you will be able to access the menu by right-clicking on the blank area to the right of it. The following command sequence will do it:

    _.-TOOLBAR ACAD.Standard _Top 0,0

    Note that this will only work if you have the acad.cuix file loaded (or partially loaded). This is the case in vanilla AutoCAD and some verticals (e.g. AutoCAD Civil 3D), but it may not be the case in other verticals (e.g. AutoCAD Architecture).

  • Ribbon. You can close the Ribbon with the RibbonClose command. If you ever want to turn it back on, enter Ribbon.
  • Dashboard. The AutoCAD 2007/8 Dashboard is gone, but you can have a vertical Ribbon instead. If the Ribbon is not visible (it won’t be if you just selected the AutoCAD Classic workspace), enter Riboon to bring it back. In the tab title row (the bar with the word Home in it), right-click and pick Undock. Now you can place and size your Dashboard-like thing as you see fit. As before, you can right-click on things to change the various settings. However, getting the contents exactly the way you want it usually involves using CUI, and that’s well outside the scope of this post.
  • Graphic Background. Despite Autodesk thinking it’s a good idea to hide all the yellow lines in your drawings by giving you a creamy drawing area, many of you will want a black background. To do this, right-click on the drawing area and pick Options… (or just enter OP), then pick the Display tab. Don’t be tempted to choose Color Scheme and set it to Dark, because that just changes the appearance of various user interface elements. Instead, pick the Colors… button. On the left, choose a context you want to change (e.g. 2D model space), choose the appropriate background element (e.g. Uniform background) and choose the particular shade that takes your fancy. There is a Restore Classic Colors button, but that only takes you back to AutoCAD 2008 with its white paper space. If you want a black paper space, you’ll have to specify that individually. When you’re done, pick Apply & Close, then OK.
  • Status bar. Right-click on a status bar button, turn off Use Icons and your text-based status bar buttons will return.
  • Classic commands. If you prefer not to leave the various new palettes on screen all the time, old versions of various commands are still available: ClassicLayer, ClassicXref and ClassicImage. There is also a system variable LAYERDLGMODE, which when set to 0 will make the Layer command work in the old and faster modal way. If you use this setting, you can still access the new modeless layer palette with the LayerPalette command. Going back further, there are command-line methods of these commands: -Layer, -Xref, XAttach, -Image and ImageAttach.

If you have allowed AutoCAD to migrate your settings (I never do), some of the above will already be done for you, but by no means all of it. Once you’re happy with your new environment, I suggest you save your workspace under a name of your choosing (Save Current As… under the gearwheel button), then export your profile in the Options command’s Profiles tab.

AutoCAD’s magic vanishing attachments

There are now quite a few file types that you can attach to an AutoCAD drawing as a reference, in the same way that you can attach other drawings as xrefs. We’ve been able to attach other drawings since Release 11 (1990) and images since Release 14 (1997), but every release since 2007 has introduced a new kind of attachment. In AutoCAD 2010, you can now also attach PDFs, MicroStation DGNs (v7 and v8), DWF and DWFx files.

But should you? Maybe not. It depends who is going to use those drawings after you. If you know for certain that every user of that drawing is going to be using 2010 and later, that’s no problem. But if there is the possibility of earlier releases being used, your fine-looking attachments could vanish silently in the night. Attach a PDF to your drawing in 2010, give it to a user of last year’s AutoCAD 2009 (you’ll need to save it as a 2007 DWG) and what will he see? Nothing. There is no text-screen warning, no bounding box, no piece of text indicating the file name, nothing. Just a blank space where there should be useful drawing content.

This problem isn’t new to 2010, because there are similar problems with the other recent attachment types. Let’s examine them one by one:

  • PDF – visible only in 2010 and later (except for the special case of 2009 with the Subscription-only Bonus Pack 2).
  • DWFx – visible only in 2009 and later.
  • DGN v7 – visible only in 2009 and later.
  • DGN v8 – visible only in 2008 and later.
  • DWF – visible only in 2007 and later.

It’s important to note that the attachments don’t actually disappear from the drawing. They are still stored there, even if you save to an earlier DWG format like 2000 or 2004. The attachments survive the round trip to an earlier DWG format intact; they will reappear just fine if reopened in 2010. (Round-tripping of new object types is something that Autodesk has done extremely well over the years).

In most cases, the objects are stored invisibly as proxy objects (object name ACAD_PROXY_ENTITY, known in the early days as zombies). In some cases, they are listed as special Underlay objects (e.g. DGNUnderlay, DWFUnderlay). In 2000 to 2006, they all list as proxies. How can you list these objects in earlier releases when you can’t see them? With a bit of LISP, or old tricks like LIST ALL Remove Crossing.

The moral of the story for drawing creators is to look before you leap whan attaching new object types. For drawing recipients, it’s something to carefully watch out for. If you’re the customer and you use an earlier release, you may even wish to include a don’t-use-this-attachment-type clause in your specifications.

Older AutoCAD loses (part of) the plot

I know there are plenty of people still using AutoCAD 2007 and earlier, so this bug warning may save some of you some grief. I have no idea how widespread or isolated this problem is, but under some circumstances I haven’t worked out yet, AutoCAD 2007 fails to plot all of certain dynamic blocks. Some attributes have a habit of being plot-shy. Even if you don’t use dynamic blocks yourself, you could receive a set of drawings, check them on-screen, approve them, plot them and send out paper drawings without all of their parts. Unless you’re carefully manually checking the paper plots, this situation is obviously a little dangerous. Fortunately, Plot Preview also shows up the problem, so it is at least possible to check things without wasting trees.

Here’s an example. This is part of such a drawing displayed in AutoCAD 2007, with all of its parts in place. One of the dynamic blocks is highlighted:

Drawing in AutoCAD 2007 with all its parts in place

Here’s that drawing plotted using AutoCAD 2007, showing the missing parts:

Drawing plotted in AutoCAD 2007 with parts missing

Earlier releases do the same, including pre-dynamic block releases. As DWF files are just electronic plots, the same problem applies to them. Yes, I’ve checked for non-plotting layers and looked into the visibility states within the dynamic blocks. An audit of the drawing indicates no problems. Attribute visibility settings are not an issue.

Here’s the same drawing plotted using AutoCAD 2009 (2008 and 2010 are fine, too):

Drawing plotted in AutoCAD 2009 with parts intact

What to do? Using a later release would solve it, but might not be a practicable solution in your office right now. Instead, you could consider using DWG TrueView for your plotting. That may not be ideal either, but it could be better than risking the consequences of an unknown number of your plots containing an unknown number of missing parts in unknown places.

Have you come across this problem? If you have any more clues about the circumstances that trigger it, please add a comment.

AutoCAD 2010 – Will you miss the Menu Browser?

I’ve closed the poll that asked AutoCAD 2009 users about their MENUBAR setting. It’s very clear that pull-down menus are still very much in use in the Ribboned world of post-2008 AutoCAD. In AutoCAD 2009, an attempt was made to provide access to pull-down menus without sacrificing that strip of screen real estate. That attempt was called the Menu Browser, it was one of the thing you could find under the Big Red A, and it really didn’t work very well. In AutoCAD 2010, the Menu Browser has gone away. The A hasn’t gone away, just the ability to access pull-down menus through it.

There are some who have expressed a deep dislike of the Big Red A, although it never offended me greatly. I just wished the features hidden under it worked better than they did in 2009. Personally, I generally prefer what’s under the A in 2010 than what’s there in 2009, but you may not. I know that when the 2009 user interface was being attacked, its most prominent defenders were those keyboard-heavy users who turned both the Ribbon and the menu bar off, giving themselves more screen space. On the infrequent occasions when a pull-down menu was required, those people were content to provide an extra click.

When I found out about the Menu Browser’s death a few months ago, I expected there would be a severe adverse reaction from such people. Maybe there will be one when people hold get the shipping product and notice it’s gone. But after my poll showed only 7% of respondents used it instead of the menu bar, I’m now expecting that adverse reaction to be smaller than I originally thought.

If you want to use AutoCAD 2010, want to work without a menu bar but still have access to menu items occasionally, what can you do? You can add a button to the Quick Access Toolbar (QAT), or any other toolbar, that toggles the menu bar on and off. Use the CUI command to add such a button.* The following macro will do the job:

'menubar $M=$(-,1,$(getvar,menubar))

There are a couple of downsides to this method. First, although this macro has been written in such a way that it should be transparent, it doesn’t currently work that way. When you push the button, AutoCAD will still cancel any command you’re in. Second, the screen resize forces a redraw, which could slow you down in very complex drawings. However, under most circumstances that redraw will still be quicker than waiting for a reaction from AutoCAD the first time you pick the Big Red A. By the way, that reaction time is better in 2010 than the very tardy 2009. As a result, even AutoCAD 2009 users might prefer to use the QAT-button method and forget the Menu Browser ever existed.

* If there is enough interest, I will do a video tutorial explaining how to add such a button to the QAT.

Gravatars – how to get a picture next to your comment

After some recent site maintenance here, you may have noticed that the comments look a bit different, and that some people’s comments have a little picture next to them. This little picture is called a gravatar (globally recognised avatar), and you can have one too. Once you set it up, you will find that it works in all sorts of places, not just this blog.

Here’s how to do it:

  1. Visit gravatar.com and pick a sign up link.
  2. Provide a valid email address; the same one you provide when adding comments to blogs. I have not received any spam as a result of doing this.
  3. You’ll be sent a confirmation email; click on the link in that and follow the prompts to set your password and so on.
  4. Choose your gravatar image from your hard drive, the internet, a webcam or a previously uploaded image. You can point to any size photo and will be prompted to select a cropped square area to display.

That’s it, although you can manage your account to provide multiple email addresses and images if you wish. Wait 5 or 10 minutes, then check out this or other blogs and web locations where you have made comments in the past. Those blogs with layouts that support gravatars should now display the picture that you associated with the email address you supplied when you made your comment. If the image doesn’t show up, do a reload/refresh and/or clear your browser’s cache and try again.

What is loaded at AutoCAD startup, and when?

Warning, CAD nerd stuff ahead. This is a long and technical post and if you’re using AutoCAD in a largely out-of-the-box state you probably won’t care about any of it.

If your modification of AutoCAD extends beyond the trivial, you may find it useful to know what AutoCAD loads, and in what order things are loaded. It is possible for LISP files in particular to tread on each other’s toes, so knowing what gets loaded when can be useful information for diagnosing such clashes. This post aims to provide that information. It uses AutoCAD 2009 as an example, but the same principles apply to all releases from AutoCAD 2006 onwards.

On startup, the first things AutoCAD loads are its CUI files. It first loads the Enterprise CUI file, then the Main CUI file, then any partial CUI files attached to the Main, then any partial CUI files attached to the Enterprise. I have no idea of the reasoning behind this slightly strange order, but there it is. The order of the partial CUIs loaded in each case is determined by the order in which they appear in the parent CUI files, which is determined by the order in which you attached them. If you don’t like this order, you can attach and reattach them in the CUI interface, or you can do the same thing much quicker with a text editor if you feel confident enough. If there are LISP files associated with these CUI files, they are not loaded yet. You’ll need to wait a few paragraphs for that.

Next, if you have created a file called acad.rx in AutoCAD’s search path, any ARX files listed in that file will be loaded. There are other ways in which developers can load their ARX files at startup, but I won’t go into that here.

Following that, the acad*.lsp files are loaded. First, Autodesk’s acad2009.lsp file is loaded. Next, if you have created a file called acad.lsp, that is loaded. These two files are only loaded at first startup, unless the ACADLSPASDOC system variable is set to 1, in which case the acad.lsp file is reloaded with each new drawing. Next comes Autodesk’s acad2009doc.lsp and any acaddoc.lsp file you may have created, in that order. These two files are loaded at startup and with every new drawing session.

It’s worth pointing out here that the acad200x.lsp and acaddoc200x.lsp files are Autodesk’s and are not intended to be modified by users. You can modify them, and adding things in there works fine, but updates and hotfixes can overwrite these files, leaving you to patch things up again afterwards. The acad.lsp and acaddoc.lsp files are yours, and that is where you are best advised to put your additions.

I hesitate to mention VBA because I have long avoided that development environment and my knowledge in that area is very limited, but if you’re a VBA developer and have created an acad.dvb file in AutoCAD’s search path, it gets loaded at this point.

Once the acad*.* files are loaded, then come any LISP files associated with the CUI files that were loaded at the beginning. For each CUI file, if there is a *.mnl file of the same name, that will be loaded first (*.mnl files are just *.lsp files renamed). After that, any LISP files that are specified in the CUI file will be loaded, in the order in which they appear in the CUI file itself. This order can be modified in the same ways that the partial CUI loading sequence can be modified; “delete” and “load” (detach and attach, really) the files within the CUI interface, or hack the CUI file with a text editor.

The CUI-associated LISP files are loaded as described in the above paragraph for each CUI file in turn, in the same order as the CUI files themselves: Enterprise, then Main, then partials to Main, then partials to Enterprise.

The Appload command provides a Startup Suite facility, where you can specify any number of files to load (*.arx, *.lsp, *.dvb, *.dbx, *.vlx or *.fas). If you have done so, those files are loaded at this point, in the order in which they appear in the Startup Suite list.

That’s all the actual loading done, but we’re not finished yet. At this point AutoCAD’s environment should be all ready to do pretty much anything, including things that modify the drawing database, including invoking commands. This was not true earlier on, so if you want to do things like change the drawing or run commands, this should be done using a startup routine rather than called directly at load time from any of the files loaded above.

If you’ve defined a VBA sub called AcadStartup(), it will be called now. If starting a new drawing, any sub called AcadDocument_Activate() will be called instead. The caveat about my VBA ignorance still applies here.

If a LISP function called (S::STARTUP) has been defined, it will be called next. Where could that be defined? Anywhere in any of the LISP files mentioned above, or in any LISP or other files that are loaded by any of those files, or by any files that are loaded by any of those files, and so on ad infinitum. It could even be defined in one of the ARX files loaded at any point. This would be unusual, but is quite possible.

If there are multiple (S::STARTUP) functions defined in various places, which one wins? Whichever one loaded last. That’s why the load order can be important, but it’s also why you should never have an unconditional (defun S::STARTUP …) definition in your LISP code. Instead, you should append your startup code to any existing (S::STARTUP) function. That way, your startup can cooperate with any others in your environment rather than walking all over it. If there is some interest in that subject, I can cover it in more detail in a future post.

In summary, here is the AutoCAD startup sequence:

A. CUI files loaded:
1. Enterprise
2. Main
3. Partials to Main
4. Partials to Enterprise

B. acad*.* files loaded:
1. Files listed in acad.rx
2. acad2009.lsp
3. acad.lsp
4. acad2009doc.lsp
5. acaddoc.lsp
6. acad.dvb

C. CUI-associated MNL and LSP files loaded:
1. Enterprise named MNL
2. Enterprise loaded LSP and MNL
3. Main named MNL
4. Main loaded LSP and MNL
5. Partials to Main named MNLs
6. Partials to Main loaded LSPs and MNLs
7. Partials to Enterprise named MNLs
8. Partials to Enterprise loaded LSPs and MNLs

D. Startup suite files loaded

E. Startup routines run:
1. AcadStartup() called (AutoCAD startup)
2. AcadDocument_Activate() called (Drawing startup)
3. (S::STARTUP) called

AutoCAD 2009 – Ribbon content for Express Tools

One of the many unfinished aspects of the AutoCAD 2009 Ribbon is the lack of Express Tools content. One enterprising user has put the effort into correcting this, and has posted an Express Tools CUI replacement in this Autodesk newsgroup thread. I have not tested this myself. As usual with CUI, be paranoid. Back up everything before you touch anything.

While I wouldn’t normally suggest you do any Ribbon custom work in 2009 in its current state, it shouldn’t hurt in this case as it should be easily redoable once Autodesk has fixed up the worst of the 2009 CUI problems. Anything else you do should be considered as disposable. The problems with 2009’s CUI are so fundamental that it is quite likely a restructure will be required to fix them, either in a service pack or in 2010. That means your 2009 CUI efforts may need to be redone, just like your AutoCAD 2008 Dashboard modifications.

AutoCAD 2009 – Drawing integrity tip – urgent!

AutoCAD 2009 users, I strongly suggest you go and set the new system variable OPENPARTIAL to 0. Now.

Why? Because if it’s set to the default value of 1, purging can be harmful to your drawings. I’ll fill in the details in a future Bug Watch column, but for now I suggest you just go and fix up that variable. It’s stored in the Registry, so you should only need to do it once unless you use multiple profiles, in which case you should do it once per profile.

AutoCAD 2009 – Putting things back to normal revisited

I see Lynn Allen has written a post explaining how to restore the “classic” interface. I commend Lynn for doing this in response to the requests she’s been receiving. It must be pretty painful for some people at Autodesk to see their Technical Evangelist showing people how to turn off AutoCAD 2009’s Big New Feature, but it’s absolutely the right thing for her to do.

The worst thing Autodesk can do right now is go into denial mode, which has happened more than once in the past when users have reacted negatively to various things. This post from Lynn gives me hope that maybe we don’t have to go through that stage this time.

Anyway, if you want more detail about putting things back to normal, have a look at my earlier post on the subject.  I’ll add one more tip here that you might otherwise miss: if you want the old layer interface to be invoked by the Layer command rather than the new pallette, set the undocumented system variable LAYERDLGMODE to 0.

The _XREF_XREF killer

If you’re an AutoCAD 2008 user you probably already know what the title refers to. If not, you probably don’t need to know. If your drawings are afflicted, I suggest you hop over to Between the Lines, grab the scale list cleanup utility and start cleaning up. Although I’ve found that this utility works very well, paranoia is usually wise in computing so make sure you back up everything before you start! The utility is installed into the AutoCAD 2008 or 2009 main installation folder, and you can make a shortcut to the CleanupScales.exe file on your desktop if you wish to make it easier to fire up.

To the Autodesk people who put the effort into creating this utility, thank you.