Friday, January 28, 2005

XOPEN Makes QuickWork of External References

Do you know XOPEN?

Many of you may be aware that you can now highlight or select your external references within the Xref Manager dialog box and click the "Open" button to open it in a new document window. Right?

But an even easier and more direct method is the one that helps when you don't even know what the Xref's name is! Ready? Type "XOPEN" at the command line and simply select a part of the xref from the screen. Magically, AutoCAD will find the file that you selected and open it in a new document window.

An alternative method is to select your External reference on the screen, right click, and choose "Open Xref" from the context menu.

Now how easy is that?

Wednesday, January 19, 2005

Slow sluggish Styles require Fast Font Fixes

Got Slow and Sluggish Styles or Files?

Often the problem with files that are slow to load, regen, pan, and zoom are related to bad, missing, or substituted fonts in TextStyle definitions. Think back to when you first opened the file inside of AutoCAD. Did the file hesitate initially? Did you see the following dialog box pop-up asking for a missing font file to be found?

Perhaps you never saw the dreaded “Specify Font for Style @@@@@” dialog box, you might still be the victim of the missing or corrupt text style disaster. You might have sluggish drawings that do not respond like they should. You might open a drawing and start working only to find text entries that disappear at random or fail to print. Does the following image look familiar?

Notice the leader lines with no annotation. Surely this drawing should be showing much more annotation and notes than it does! This condition is known as “Fontaltitis”. You are the victim of a randomly replaced font. If any of the preceding symptoms have occurred or if you have the variable “fontalt” set to automatically swap out a missing font, you might experience the same behavior without ever seeing the missing font box. Have no fear! When we are done, you will know exactly what to do. You will learn the tricks of the Font Masters, so that you can trouble shoot, diagnose, and fix even the most stubborn of sluggish files.

What do I need to do?

The best answer is to immediately get on the phone with whoever sent you the original file. Ask them to kindly perform an “Etransmit” from within the affected file. Be sure to remind them to “include” the fonts in their options. When you receive the newly created collection, be sure to save the included font files (*.ttf, *.shx) to the correct folder. If you are not sure where the files should be saved, try typing the following at the command line and hitting the “Enter” key. It will tell you where to put the files.

(findfile "romans.shx")

If you were able to retrieve the correct font files, then all is well! When you are finished copying the files to the correct location simply close and reopen the offending file. You should see a noticeable speed improvement. If you were unable to locate the fonts or perhaps never saw the warning box, have no fear! Read on for an answer to the problem.

That didn’t Work! Now What?

  1. If you made it this far, chances are you saw the “Specify Font for Style @@@@@” dialog box. Maybe you clicked “cancel” or even possibly picked a font style from the provided selection area. I hate to tell you this, but you wasted your time. The only way to fix this problem is to make the font file available to the Text Style. You can do this by getting a copy of the font file and placing it in AutoCAD’s search path, or by changing the definition of the Text Style so that it uses a font file available to the computer.
  2. Launch the “Style” command using your preferred method of interacting with AutoCAD:
    1. From the command line, type the command “Style” and hit your “Enter” key or use the “Rule of Thumb”.
    2. Choose the “Text Style” command from the “Format Pulldown.

    3. Choose the “Text Style” command from the Text Toolbar. It’s the button with the letter “A” and the paint brush.

  3. So far so good, you should see the “Text Style” dialog box displayed if you’ve followed along successfully! Do you remember the font name the “Select…” dialog box was asking for? If not, don’t be alarmed, but it would be much easier if we knew what to look for. Without that knowledge we will have to just proceed to investigate. Remember the error message? Here it is again in a smaller format with some critical areas highlighted for your enjoyment.

    Of particular note are the “Style” name shown in the Window Caption (Standard in this example) and the actual font file name as shown at the bottom in the sentence fragment: “Font not found: arfor”. If you didn’t pay attention when this dialog box first appeared, then stay tuned because I’ll show you the Font Master tip.

  4. Okay, still here I see, that means that for some reason we don’t know or didn’t pay attention to the missing fonts when AutoCAD first told us about it, or didn’t if you’re suffering from “fontaltitis”. The following graphic shows you the trick to identifying a missing or problem font file when viewing the fonts and text styles from the “Text Style” box.

    Did you notice the indicator? Look at the differences shown in the following graphic as I click on the “Font Name” selection box. Did you get the difference? That’s right. All of our suspect or problem text styles will display the “Name” only. Notice the difference between the “Zero Threes” font file and the rest of the font files available as shown. All of the qualified font names have a little graphic indicator as shown to the immediate left of the font name in Figure 8. The other tip? Did you notice that the fonts that were missing from your search path also did not display any "preview" in the lower right corner of the dialog box. Now you are the Tip Master!

  5. So now your task is to use the ‘”Style Name” selector shown at the top left of the “Text Style” dialog box. One by One we will select a “Text Style” from the list shown in the “Style name” frame. After each style is chosen, look in the “Font Name” selection list. Is there a little graphic shown to the left of the font name? If so, then skip this one and move to the next one. If the icon is missing, then you found one for repair, click the list pull down shown in the “Font Name” frame and find a font with a graphic/icon displayed to the left of its name. You can chose to “Apply” your changes as you go by selecting the “Apply” button or choose to live on the edge and wait until all changes have been made. Don’t forget if you chose excitement rather than prudence to be sure to click the “Apply” button prior to saving and closing the “Text Style” dialog box.

I hope this helps.

Note: You can click on any of the images shown in this entry to see a larger version.

Fascinating Forensic Foray - Dissecting the Witty Worm

The Witty Worm was particularly devastating to Autodesk User Group International (AUGI)'s website and their previous webhost (CI Host), it has even darker implications for the future. Although AUGI has recovered and reinvented their site as I reported in my LugNuggets article in May of 2004, others were not so fortunate. Read more about the nastiest, most effective computer attack ever in Scott Berinato's Security article: Why Wasn't the Witty Worm Widely Worrisome? available at

For a forensic analysis of the attack complete with animations and some of those same type of geeky graphs we laughed about at Autodesk University, see the outstanding dissection of the Witty Worm: The Spread of the Witty Worm. This article written by Colleen Shannon and David Moore of the Cooperative Association for Internet Data Analysis (CAIDA) explores the spread of the Witty Internet Worm in March 2004 .

Thursday, January 13, 2005

AUGI Board of Directors Meeting

The Autodesk User Group International (AUGI) is holding one of their planning meetings today, tomorrow, and Saturday. We will be meeting with a number of Autodesk friends and previewing some new technology as we develop our plan of activities for the coming year.

We are planning some exciting initiatives in the Local User Group and International arenas as well as some planned improvements to the website. If you've got any burning questions, or suggestions please shoot me an email by clicking the link below.

Stay tuned to this page for an update. (I'll share what I can with you.)

Tuesday, January 11, 2005

vlax-product-key list submitted

I received the following list of product language pairs today from an anonymous reader in the blogosphere. I am posting them here for others who need to identify the current product by reading the registry or using (vlax-product-key):

Autocad 2004 English: 201:409
ADT 2004 English: 204:409
MDT 2004 English: 203:409
Mechanical 2004 English: 205:409
Building Systems 2004 English: 206:409
Map 2004 English: ACAD-202:409
LDDT 2004 English: 208:409
Civil Design 2004 English: 208:409
Survey 2004 English: 208:409

You can change the product key from a 200 level to a 300 level for most products when identifying AutoCAD 2005 products so this results in the following list:

Autocad 2005 English: 301:409
ADT 2005 English: 304:409
MDT 2005 English: 303:409
Mechanical 2005 English: 305:409
Building Systems 2005 English: 306:409
Map 2005 English: ACAD-302:409
LDDT 2005 English: 308:409
Civil Design 2005 English: 308:409
Survey 2005 English: 308:409

That ought to give you something to start with.

Thursday, January 06, 2005

AUGI In the News...Digging Deeper

I just ran across this friendly article about AUGI and the happenings at Autodesk University.
Read more about it on Diggin Deeper, a construction blog.

AUGI's Wish ListBy Judy Schriener [December 8, 2004]

Florida DotNet Developers CodeCamp

It'll be geek overload when 150+ developers descend on Nova University in Ft. Lauderdale, Florida for some FREE Microsoft training in Dot Net. According to the website, "South Florida Code Camp 2005 is going to be one heckuva event".

The day will begin with a KeyNote address at 8:00 am. Four tracks, with six sessions throughout the day will result in a full day of Free training for those working in DotNet.

Tentative Agenda:

Click the title of this article for more information. Go here for registration.

Wednesday, January 05, 2005

Do you support XP? Want Free Training?

For a limited time, you can get free certification prep training for the Microsoft Certified Desktop Support Technician (MCDST) track. Not interested in certification? Take the free training anyway. Its free after all. Check out what is covered:
  • Clinic 2263, Exam Preparation for the MCDST Certification, is an online, self-paced course covering hardware, configuration, troubleshooting topics you might encounter while supporting Windows XP users.

Learn more about the clinic here.

Interested in certification? Look here.

Paint on WiFi Force Field? Be secure....

You've done everything you know to ensure that your wireless network is secure! Right?....Well maybe not. Read about this new technology that mixes Radio Shack with the Hardware Store.
Tiny Force Field Wireless is selling paint laced with aluminum and copper that it claims will keep wireless-network traffic within company walls.

Monday, January 03, 2005

Quick Viewport Navigation Tip

Working in Paperspace got you down?
Can't seem to select the correct viewport to work on? Got overlapping Viewports and keep activating the wrong one?
  • To cycle through all the viewports in Paperspace one at a time, simply activate a viewport. Any viewport will do. Once the viewport is active (Hint: the boundary should be bold!), hold down the "CTRL" key and click the "R" key. Every click on the "R" key will advance the active viewport to a different viewport.
Hope you find that helpful!

Saturday, January 01, 2005

Loading Custom Lisp files from a text file.

Happy New Year!

Would you like to control the number and load order of your custom lisp files? Of course you would, wouldn't it be nice to simply add a filename and path to a data file and have AutoCAD load the file for you? What if you want to add a new file? Do you want to re-write the code for each additional file? Probably not! Here is a way to set up a system so that you can simply add and subtract lisp files from a list contained in a text file. (Note: the list should contain the entire name and path to the autolisp file.)


  • A folder containing the lisp files to be loaded. This could be your office standard location or a user maintained folder.
  • An acad.lsp file containing the code shown in Listing 1. (Note: this code could be added to your own acad.lsp if you have already defined one!) Alternately, you could load this file from a menu selection, but I like it to be automatic and transparent.
  • A text based file containing a list of each autolisp file. One file and path on each line. See the graphic below.

Listing 1:

How to Do It:

Here is a working example, walkthru, and the files required to repeat this on your system.

1.) Create a folder on your root drive (C:) and call it "customlisp".

2.) Now browse to this new folder and create your datafile. I called mine "customlisp.dat".

3.) Open your new data file ("c:\customlisp\customlisp.dat") in the text editor of your choice. I prefer TextPad. Add the full path and filename to every autolisp or visual lisp file you would like to have loaded. Be sure to use normal naming conventions, no need to use double backslashes! My Example is shown above with files contained on another drive such as: "x:\customlisp\A_2k5custom.lsp" Click here to download my example files:

4.) Now ensure that all the files you have added to your data file are present and accounted for in the folder of your choosing. If you used names other than those provided in the example just be sure to perform the appropriate search and replace. Click here to download my example files.

5.) Now to automate this process, we will use an AutoCAD built in function by creating a lisp file called "acad.lsp". Click here to download the file I have created for this example (it is called "customlisp.lsp" so it wouldn't compete with any present files). Note: you can either add the code contained in the file to your own "acad.lsp" or simply open the downloaded file in your favorite text editor and rename it "acad.lsp". Be sure that it can be found somewhere in AutoCAD's search path.

6.) Now launch AutoCAD to see it run. If you have run this correctly, you should see the following displayed at the command line.

How it Works?

After AutoCAD loads the resident "acad200#.lsp" file is loaded, AutoCAD will look for and load any arx routines found listed in a file called "acad.rx". The next file that AutoCAD will look for and load is called "acad.lsp". If you have followed the instructions listed above, AutoCAD will find your acad.lsp file and load it. As soon as it loads the file, AutoCAD is instructed to perform the following tasks:

1.) Remember the location of a file named "c:\customlisp\customlisp.dat".

(setq fil "c:\\customlisp\\CustomLisp.Dat")

2.) Open the file remembered in step 1 and read each line resulting in a count of how many files are listed in the file known as "customlisp.dat"

(setq x (open fil "r") ct 0)

(while (read-line x)

(setq ct (1+ ct))


(close x)

3.) Re-open the "customlisp.dat" file, and use the count saved in the variable "ct" to verify that we haven't reached the end of the list, begin loading each file listed by reading the filename from "customlisp.dat" and verifying that the file exists and can be found on the network. This loop uses the visual lisp sub routine: "vl-file-systime". If the file cannot be found, there will be information written to the command line telling the user who to contact to correct this problem (this is stored in the variable "ccinfo"). When the file is found, it will be loaded. Note: each file has its own prompt to let the user know that the file has been correctly loaded.

(setq y (open fil "r") rt 0)

(setq ccinfo "... Contact CAD Coordinator #4855")

(while (<>

(setq filenom (read-line y))

(if (/= (vl-file-systime filenom) nil)
(load (findfile filenom)

(strcat "\n" filenom " not found " ccinfo)


(prompt (strcat "\n" filenom " not found " ccinfo))


(setq rt (1+ rt))


(close y)


That is all that is required to modularize and automatically load as many custom lisp routines as you desire.

I hope you put this to use in your own environments. If you want a method with a little more functionality and features, learn how to fully modularize this loading routine using the Registry by reading my "Controlling Customization" series which started in the November 2004 issue of AUGI's HotNews newsletter. The latest article (the third in the series) should be released any day now.