Saturday, November 28, 2009

AutoCAD: unwind skipped on unknown exception

When AutoCAD starts or loads a new drawing, the following cryptic error/warning message is displayed:

; error: Unknown exception occurred
; warning: unwind skipped on unknown exception
*Cancel*

This problem is caused by a corrupt or locked CUI (or CUIX) file. It may be the main ACAD.CUI file or one of the partial menu files (Express Tools, Custom.cui, etc.). Replace the corrupted menu file - either manually from a backup (or original media) or by right-clicking on the CUI name in the CUI dialog.

How to add own symbols to MText Symbol list?

The default MText editor in AutoCAD (2002 and higher) offers a list of predefined symbols for quick entry in the edited text (right-click in the MText editor > Symbols).

You can add your own symbols and boiler-plate texts to this list. Run REGEDIT (Windows Registry editor) and add a new key "Symbols" to the MTEXT key in the HKCU portion for your AutoCAD version. Then add numbered pairs of "Name" and "Contents" string values with your data. The specified items will be automatically added to the MText Symbol list. You can even add these data while AutoCAD is running.

Try e.g. the following registry records - either add them manually or save this to a .REG file (attached) and double-click on it (please note your AutoCAD version/language code "8001:409" may differ; backslash is to be doubled only in the REG file):

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\MTEXT\Symbols]
"Name 1"="Address"
"Contents 1"="XANADU a.s., Tylova 17, Ceske Budejovice, Czechia, www.xanadu.cz"
"Name 2"="Yin-Yang"
"Contents 2"="\\U+262F"

(download MTEXT-Symbols.reg)

This will add two new "symbols" - our Address and the Yin-Yang symbol.

List all hyperlinks in your DWG drawing

If you need to display the list of all hyperlinks attached to objects in your current AutoCAD drawing, you can use the SHOWURLS command.

To get a text list (for copy/paste, insert as drawing text, sort, etc.) you can use the simple ListLinks utility available on www.xanadu.cz/download.

Just load it with APPLOAD and start the ListLinks command.

Send Twitter messages directly from AutoCAD

With the LISP utility Xanadu Twitter.vlx you can send tweets (status messages) directly from your AutoCAD command line.

Load the TWITTER.VLX in your AutoCAD session (e.g. with the _APPLOAD command). Then run the TWITTER command, enter your Twitter username and password, plus your message to send an update (tweet, status) to your Twitter page (timeline).

You can also use the LISP function (twitter) to automate postings (from scripts, menus, macros, project changes...):

(twitter mytwittername mytwitterpassword mymessage)

See examples at our Twitter page

You can download Twitter.vlx from www.xanadu.cz/download

OK, we don't expect AutoCAD users will really tweet from AutoCAD, but in this way AutoCAD itself can send some semi-automatic status messages e.g. to your project twitter page

How to create an always symmetrical drawing?

How to make a symmetrical drawing where the left side is always (even after editing) a perfect mirror of the right side?

In AutoCAD, you can use Xref for this. First make a drawing consisting of the right half only and save it.

Then make a new empty drawing and attach this right part as a Xref (scale 1:1). Then attach the same part again as a Xref, this time with the X-scale set to -1. Align both halves together.

Any changes in the left or right part (done by RefEdit/doubleclick or by editing the separate DWG) will be reflected in the other part.

Possible texts will be displayed mirrored

Missing option "Include when adding sheets" in AutoCAD 2010?

If you have upgraded to AutoCAD 2010 from an older version (2009), you may miss the option "Include when adding sheets" (Model/Layout) in the dialog of the command PUBLISH.

The selection of model/layout tabs is now available directly in the file selection dialog when adding new sheets to publish. For existing sheets, you can control this setting in the context menu - after mouse right-click on the sheet name.

The Separate option does not work on my combined 3D solids

An attempt to use SOLIDEDIT to separate a 3D solid combined from multiple objects fails.

The option Body > Separate in the OBJEDIT command is to be used to separate multi-lump solids (with individual, spatially separated disjointed volumes), not for solids with a single continuous volume created e.g. by combining multiple intersecting 3D objects (Union).

Running process WSCommCntr1.exe

The WSCommCntr1.exe process may stay running (doesn't terminate) after you exit AutoCAD (or Inventor or Revit) or it may take too much system resources (CPU time) during the running session of your CAD application.

This background process is a part of the Autodesk Communication Center module, which checks for web updates (service packs), subscription center messages, preset RSS channels and other online information when you run AutoCAD.

Due to its nature (online internet communication), this process is susceptible to various problems and conflicts with firewalls, anti-virus programs (and viruses), communication and network settings.

In case of problems you may want to switch it off. You can do this either one-off by killing the WSCommCntr1 process in the Task Manager (Ctrl+Shift+Esc), or by completely disabling the Communication Center module. You can disable this module using the "CAD Manager Tools" (see your CAD setup media) or in the Registry.

Run REGEDIT and go to:

HKLM/Software/Autodesk/Rxx.x/ACAD-xxx:xxx/CADmanager Control/Communication Center

and set the keys "EnableCommunicationCenter", "EnableNonPatchNotifications" and "MaintenancePatchNotificationOption" to 0 (zero).

The Communication Center (including the WSCommCntr1 process) is now disabled.

R14PSKit: The system cannot find the path specified

The list of plot style tables is empty and when you try to add a new plot style (New...), AutoCAD displays the error message "The system cannot find the path specified".

This is caused by an improperly setup folder for plot styles. In the OPTIONS dialog on the Files tab, check the path setting of Printer Suppport File Paths > Plot Style Table File Path. The specified folder must exist and should contain the individual .CTB and .STB files.

How to add a suffix or prefix to all layers

If you want to rename all your layers, blocks or other AutoCAD drawing symbols by adding a common prefix or suffix, you can use the free PSrename utility.

The PSrename command allows to select the symbol table (Block, Dimstyle, Layer, Linetype, Style, Ucs, View) and to enter an arbitrary prefix or suffix string. Then it renames all selected symbols (e.g. layers) by adding this prefix or suffix string. It automatically skips renaming "protected" DWG symbols like the layers "0" or "DEFPOINTS", "AVE_RENDER" blocks, xref symbols, etc.

You can download PSrename from www.xanadu.cz/download, load it with APPLOAD.

Just PURGE - no question asked

If you want to perform a PURGE in your drawing, without any interactive questions, you can use the commandline version of this command: -PURGE, or a simple LISP macro:

1. Either add the following menu macro to your menu:
_-PURGE;_All;*;_N;

2. Or add the the following LISP macro:
(vl-load-com)(vla-purgeall (vla-get-activedocument (vlax-get-acad-object)))

Or use LISP to define your own new command PURGEA:

(defun C:PURGEA ()
(vl-load-com)
(vla-purgeall (vla-get-activedocument (vlax-get-acad-object)))
(prin1)
)

AutoCAD reports: error: bad argument type: fixnump

The "fixnump" error means that in a loaded LISP application, you have used a real number (or string or an uninitialized variable) in some internal function supporting only integer numbers.

This can be caused by an error in the programming code or by an invalid format of input data. If you are the author of the respective LISP application, please check possible invalid combinations of functions and parameters, e.g. (itoa 1.0).

How to show history of drawing entities?

The order in which the individual drawing entities were created - i.e. their history in time - can be displayed using the LISP utility History.

Xanadu History is a free LISP utility allowing to "replay" the history (order) the drawing entities were created. It is not just a slow redraw. The individual drawing objects are animated in the order of creation time, not in the assigned draw order.

Load the HISTORY.VLX in your AutoCAD session (e.g. with the _APPLOAD command). In a copy of your DWG drawing, run the HISTORY command. It will initially hide all drawing entities. Then the entities will be individually displayed in the order of creation. You can choose automatic (animated) display or single step display on pressing ENTER.

The animation speed can be controlled by the LISP variable "history_delay".

You can download History from www.xanadu.cz/download.

How to run AutoCAD without opening an empty drawing?

If you want to run your AutoCAD without creating an empty "unnamed" drawing "Drawing1.dwg" (Zeichnung1.dwg, etc.), you can use a simple script to avoid it.

In the properties of the AutoCAD icon on your desktop edit the line Target and add a parameter:


/b close

e.g.:


"C:\Program Files\AutoCAD 2010\acad.exe" /b close

Now create a simple text file CLOSE.SCR in AutoCAD search path (so it can find it) - this file will containg a single line (ended with Enter):


_CLOSE

If you start AutoCAD using this icon, the empty DWG drawing will be immediately closed.

Another option is the variable STARTUP.

My AutoCAD does not display solid hatches and fills

If your DWG drawing doesn't show solid hatches and fills, first of all check the FILLMODE variable.

If this variable is On and if other hatch types are displayed properly, the possible cause of this problem can be the visual style with hidden lines which you may have set inadvertently (see VISUALSTYLES or SHADEMODE).

Another cause may be an incompatible graphics card or its driver.

My AutoCAD does not display solid hatches and fills

If your DWG drawing doesn't show solid hatches and fills, first of all check the FILLMODE variable.

If this variable is On and if other hatch types are displayed properly, the possible cause of this problem can be the visual style with hidden lines which you may have set inadvertently (see VISUALSTYLES or SHADEMODE).

Another cause may be an incompatible graphics card or its driver.

How to run AutoCAD without opening an empty drawing?

If you want to run your AutoCAD without creating an empty "unnamed" drawing "Drawing1.dwg" (Zeichnung1.dwg, etc.), you can use a simple script to avoid it.

In the properties of the AutoCAD icon on your desktop edit the line Target and add a parameter:


/b close

e.g.:


"C:\Program Files\AutoCAD 2010\acad.exe" /b close

Now create a simple text file CLOSE.SCR in AutoCAD search path (so it can find it) - this file will containg a single line (ended with Enter):


_CLOSE

If you start AutoCAD using this icon, the empty DWG drawing will be immediately closed.

Another option is the variable STARTUP.

Automatic drawing label - filename, date, author

Using the text fields introduced back in AutoCAD 2005 you can easily create an automatic block to label your drawing with the information about its file name and path, last save date and author, and last plot date.

See an example - in your AutoCAD drawing enter the INSERT command, click the Browse button, press Alt+3 (Search Web) and in the lower address field enter the URL address http://www.xanadu.cz/dl/xstamp2005.dwg. Alternatively, use the commandline version of the command: _-INSERT http://www.xanadu.cz/dl/xstamp2005.dwg.
This will insert a block containing predefined automatic text fields - these fields will be updated on any save and plot.

You can also try the Net_ID dynamic block.

Can I legally use a second copy of AutoCAD on my other PC?

Yes, if you are the owner of this second PC (e.g. a laptop/notebook) and if you comply with the license agreement of your Autodesk CAD application. E.g. the license agreement to AutoCAD 2010 says in the paragraph 3.1.2:

Additional copies. .... for each Permitted Number of copies of the Software, You may Install and Access, solely within Your Territory, one (1) additional copy of the Software on a second Computer provided that:
  1. Such second Computer is owned or leased by You (and not by another person, such as Your employee, if any)
  2. Such second Computer is either a portable Computer or a nonserver Computer away from Your usual work location;
  3. The additional copy of Software is Accessed solely for the purpose of enabling You (or Your employee, if any) to perform work while away from Your usual work location;
  4. The original and additional copy of the Software are used only by the same person, and only one (1) of the Software copies is Accessed at any one time; and
  5. Both copies of the Software are Installed and Accessed exclusively with the copy protection device (if any) supplied with the Software.
Corporate Subscription users can also use the "Home Use Policy" (where applicable), through which you can use the second local copy of the given CAD application even on a private computer owned by the employee.

Other methods of copying a single software license on multiple computers, or bypassing copy protection, lending software, hacking, cracking, using keygen generators, etc. will break copyrights and violates the law in most countries - you may be subject to criminal penalties.

Simply add or delete a polyline vertex

To edit vertices of a polyline in AutoCAD, you can use the PEDIT command or grip editing.

Easier, interactive adding (inserting) of new vertices, or deleting (removing) existing vertices can be done with the help of the free LISP utility Xanadu AddV. With its commands AddV and DelV you can add or delete a polyline vertex just be picking a point with your mouse cursor.

There are two versions of the "add" and "del" commands - with a single click for select and add/delete (AddV1, DelV1) and with a separate select and click to add/delete (AddV, DelV).

You can download the AddV utility from www.xanadu.cz/download, load it with APPLOAD.

How to set weld symbol size in AutoCAD Mechanical?

You can use the drawing variable gef@symbol@weldsize to set weld symbol size in AutoCAD Mechanical.

In your script or macro, use the function - e.g.:

(amgsetdwgsetting "gef@symbol@weldsize" 0.8)

Fading xrefs in AutoCAD

If you want to dim (fade) all drawing objects coming from attached Xrefs, set the XDWGFADECTL variable to a higher value.

And vice-versa: the zero or negative value of this variable displays the xref-layers (external references) in a normal standard way (not dimmed).

How to remove arc segments from Pline?

If you want to remove all arc segments from a polyline - replace them by straight lines - use the PEDIT and its option Decurve.

To process multiple polylines, you can use the following LISP code (REMARC command):

(defun C:REMARC ( / i ssl ss e)
(setq ss (ssget "_X" '((0 . "LWPOLYLINE"))))
(setq i 0 ssl (sslength ss))
(while (< i ssl)
(setq e (ssname ss i))
(command "_PEDIT" e "_De" "")
(setq i (1+ i))
)
(princ)
)

How to add a TrueType font into AutoCAD?

TrueType fonts (.TTF) cannot be added to AutoCAD (unlike SHX) just by copying into the Fonts folder. TrueType fonts are Windows system fonts which have to installed into Windows.

In the Windows Control Panels (WinXP/Vista) choose Fonts and in the File menu select "Install new font". In Windows 7 just drag the TTF file to this Fonts window or right-click on the TTF file and choose Install.

How to scale all texts in a drawing while keeping their position?

You can use the SCALETEXT command and its options Existing (existing reference point) and Scale (relative scaling factor to make texts bigger or smaller).

Please note that the text created with the alignment Fit or Align will be also scaled, so their second alignment point will change.

In older AutoCAD versions switch to the World UCS first (thanks murrayc).

Switching layers using keyboard shortcuts

If you want to quickly switch to frequently used layers in your AutoCAD drawings, you can assign keyboard shortcuts to the individual layers.

In the CUI dialog first create (see the "New command" icon") new commands (menu macros) in the form of:


'_-LAYER;_Set;mylayer1;;

(replace "mylayer1" by your individual layer names)

Then assign keyboard accelerators to these newly created commands. In the section Keyboard shortcuts > Shortcut keys attach the required key combination ("accelerator", "hotkey"): first mouse-drag the command from the list of commands to the above mentioned section and then on the right side fill in the field Keys (good candidates for key combinations for a series of layers are e.g. Ctrl+NumPad0 to 9, Alt+NumPad0 to 9, Ctrl+Alt+NumPad0 to 9).

After you exit the CUI dialog you can quickly switch your layers from the keyboard, just by a simple key combination.

Unhandled exception: Index was outside the bounds of the array

An error is displayed during editing of annotation scale list (SCALELISTEDIT) in my drawing: "Unhandled exception: Index was outside the bounds of the array."

This is caused by the structure of a very large list of annotation scales brought into your drawing. Apply SP1 for AutoCAD 2008. Edit the scale list using the commandline version of the command - i.e. -SCALELISTEDIT, or use the utility "Scale List Cleanup" or "DBXremSL" to remove excessive scales (see Download).

The action recorder macro changes my drawing view

If you don't want the Action recorder to change your drawing view (zoom) after playing your macro, check its view settings).

In the dialog of the ACTMANAGER command, choose your macro and click the Change button. In the section "Restore pre-playback view" uncheck the option "Once playback finishes".

Modified drawing name as an automatic field

If you want to insert a text in your drawing (e.g. to the title block) which contains a manipulated name of the current drawing file - e.g. the filename left-trimmed or right-trimmed at a number of characters, you can use a combination of Diesel expressions in an automatic text field (e.g. with the FIELD command).

Some examples:

Drawing file name, no path, from the 3rd character (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGNAME),3,99)

Drawing file name, no path, no extension (4 characters), right-trimmed at another 3 characters (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGNAME),1,$(-,$(strlen,$(getvar,DWGNAME)),7))

Beginning of the drawing path (12 characters), ellipsis, first 8 characters of the drawing file name (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGPREFIX),1,12)...$(substr,$(getvar,DWGNAME),1,8)

Path without the disk letter and the drawing file name, all converted to uppercase (paste as a Diesel expression to a Diesel-type field):


$(upper,$(substr,$(getvar,DWGPREFIX),3)$(getvar,DWGNAME))

AutoCAD reports SELECTSIMILAR as an unknown command

The commands SELECTSIMILAR, ADDSELECTED, ISOLATEOBJECTS, HIDEOBJECTS, UNISOLATEOBJECTS and HATCHTOBACK are part of the "Subscription Advantage Pack" for AutoCAD 2010 and so they are not available in the standard version of AutoCAD 2010.

Download and install the appropriate Subscription Advantage Pack from your Subscription Center. See also Subscription Advantage Packs 2010.

Total length of lines in a drawing (by layer)

With the free LISP utility Xanadu AddLen you can summarize the total length of all selected lines, arcs, polylines and other curves in your current drawing.

The lengths are also grouped by layers. You can optionally export the results to a SDF text file.

Sample output:

Layer-Length:
0 118.1143
POWER 438.91
PHONE 311.08
LAN 3010.72

You can download the AddLen utility from www.xanadu.cz/download. Run it with the AddLen command.

How to display 4 grips in the corners of MText?

If you are used to manipulating MText objects with the four grips in the corners of the text frame, you can still use them instead of the simplified grips of MTexts in AutoCAD 2010 (and higher).

To return to the pre-2010 behaviour of mtext grips, switch off dynamic columns. Before you create the text, set the MTEXTCOLUMN variable to 0 (instead of the default 2). If you want to change an existing paragraph text object, change its property (Ctrl+1) "Columns" to "No columns".

Selecting objects by name

In order to quickly select block references from a DWG drawing and first of all to perform block selections from AutoCAD script files, you may need a useful tool for selection of blocks by their name.

This function can be performed in two simple ways. E.g. if you need to erase all blocks named "MYBLOCK" from your drawing, use one of the following methods (menu-macro format used for readability, for scripts replace the semicolons by spaces):

* _ERASE;(ssget "_X" '((0 . "INSERT")(2 . "MYBLOCK")))
* SSX;;B;MYBLOCK;;_ERASE;_P;;

The first method uses the LISP object selection function. The second method uses the command SSX from Express Tools.

None of these methods can be used in AutoCAD LT.

Thursday, November 26, 2009

How to remove arc segments from Pline?

If you want to remove all arc segments from a polyline - replace them by straight lines - use the PEDIT and its option Decurve.

To process multiple polylines, you can use the following LISP code (REMARC command):

(defun C:REMARC ( / i ssl ss e)
(setq ss (ssget "_X" '((0 . "LWPOLYLINE"))))
(setq i 0 ssl (sslength ss))
(while (< i ssl)
(setq e (ssname ss i))
(command "_PEDIT" e "_De" "")
(setq i (1+ i))
)
(princ)
)

How to add a TrueType font into AutoCAD?

TrueType fonts (.TTF) cannot be added to AutoCAD (unlike SHX) just by copying into the Fonts folder. TrueType fonts are Windows system fonts which have to installed into Windows.

In the Windows Control Panels (WinXP/Vista) choose Fonts and in the File menu select "Install new font". In Windows 7 just drag the TTF file to this Fonts window or right-click on the TTF file and choose Install.

How to scale all texts in a drawing while keeping their position?

You can use the SCALETEXT command and its options Existing (existing reference point) and Scale (relative scaling factor to make texts bigger or smaller).

Please note that the text created with the alignment Fit or Align will be also scaled, so their second alignment point will change.

In older AutoCAD versions switch to the World UCS first (thanks murrayc).

Switching layers using keyboard shortcuts

If you want to quickly switch to frequently used layers in your AutoCAD drawings, you can assign keyboard shortcuts to the individual layers.

In the CUI dialog first create (see the "New command" icon") new commands (menu macros) in the form of:

'_-LAYER;_Set;mylayer1;;

(replace "mylayer1" by your individual layer names)

Then assign keyboard accelerators to these newly created commands. In the section Keyboard shortcuts > Shortcut keys attach the required key combination ("accelerator", "hotkey"): first mouse-drag the command from the list of commands to the above mentioned section and then on the right side fill in the field Keys (good candidates for key combinations for a series of layers are e.g. Ctrl+NumPad0 to 9, Alt+NumPad0 to 9, Ctrl+Alt+NumPad0 to 9).

After you exit the CUI dialog you can quickly switch your layers from the keyboard, just by a simple key combination.

Unhandled exception: Index was outside the bounds of the array

An error is displayed during editing of annotation scale list (SCALELISTEDIT) in my drawing: "Unhandled exception: Index was outside the bounds of the array."

This is caused by the structure of a very large list of annotation scales brought into your drawing. Apply SP1 for AutoCAD 2008. Edit the scale list using the commandline version of the command - i.e. -SCALELISTEDIT, or use the utility "Scale List Cleanup" or "DBXremSL" to remove excessive scales (see Download).

The action recorder macro changes my drawing view

If you don't want the Action recorder to change your drawing view (zoom) after playing your macro, check its view settings).

In the dialog of the ACTMANAGER command, choose your macro and click the Change button. In the section "Restore pre-playback view" uncheck the option "Once playback finishes".

Modified drawing name as an automatic field

If you want to insert a text in your drawing (e.g. to the title block) which contains a manipulated name of the current drawing file - e.g. the filename left-trimmed or right-trimmed at a number of characters, you can use a combination of Diesel expressions in an automatic text field (e.g. with the FIELD command).

Some examples:

Drawing file name, no path, from the 3rd character (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGNAME),3,99)

Drawing file name, no path, no extension (4 characters), right-trimmed at another 3 characters (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGNAME),1,$(-,$(strlen,$(getvar,DWGNAME)),7))

Beginning of the drawing path (12 characters), ellipsis, first 8 characters of the drawing file name (paste as a Diesel expression to a Diesel-type field):


$(substr,$(getvar,DWGPREFIX),1,12)...$(substr,$(getvar,DWGNAME),1,8)

Path without the disk letter and the drawing file name, all converted to uppercase (paste as a Diesel expression to a Diesel-type field):


$(upper,$(substr,$(getvar,DWGPREFIX),3)$(getvar,DWGNAME))

Total length of lines in a drawing (by layer)

With the free LISP utility Xanadu AddLen you can summarize the total length of all selected lines, arcs, polylines and other curves in your current drawing.

The lengths are also grouped by layers. You can optionally export the results to a SDF text file.

Sample output:

Layer-Length:
0 118.1143
POWER 438.91
PHONE 311.08
LAN 3010.72

You can download the AddLen utility from www.xanadu.cz/download. Run it with the AddLen command.

AutoCAD reports SELECTSIMILAR as an unknown command.

The commands SELECTSIMILAR, ADDSELECTED, ISOLATEOBJECTS, HIDEOBJECTS, UNISOLATEOBJECTS and HATCHTOBACK are part of the "Subscription Advantage Pack" for AutoCAD 2010 and so they are not available in the standard version of AutoCAD 2010.

Download and install the appropriate Subscription Advantage Pack from your Subscription Center. See also Subscription Advantage Packs 2010.

Section modulus of 2D profiles in AutoCAD

The MASSPROP command does not display the value of the section modulus of the selected object.

To calculate the section modulus Wx/Wy (SMx/SMy) of simpler 2D profiles in AutoCAD you can use the LISP utility Xanadu Modulus.

Its MODULUS command prompts for selection of a closed polyline or a region and calculates the section modulus to the centroid of the geometry. The resulting values Wx and Wy can be inserted into the drawing as a text.

The values are calculated from the moments of inertia and they are relevant only for simpler geometric shapes.

You can download the free Modulus application from www.xanadu.cz/download

You can preset the multiplication factor for displayed results:
(setq modKoef 0.001)

You can preset the suffix for displayed results:
(setq modSuf " cm^3")

How to replace some of your blocks with a new block?

If you need to replace only some instances (references) of the given block with a new block, you cannot use the standard functions for block replacements (BLOCKREPLACE, INSERT, etc.) - these functions modify the definition of the block and so they influence all its references (insertions).

To replace only selected occurrences of the given block in your DWG drawing you can use the free LISP utility Xanadu RIblock - see www.xanadu.cz/download.

The RIblock command prompts for the name of the replaced block (or for picking its sample), then you select the references of this block (to be replaced) and then you specify (by picking or by name) the new block. This new block will replace the selected references of the original block. Possible attributes with the same name (tag) will be automatically transferred from the replaced blocks.

Cannot install AutoCAD on a 64-bit version of Windows?

If you try to install AutoCAD (or LT, AutoCAD Architecture, Mechanical, Electrical, etc.) on Windows 7 64-bit, Vista 64 or Windows XP x64, you may get a message saying that your 32-bit AutoCAD is not compatible with this 64-bit operating system.

Just install the right version of AutoCAD. Make sure you are installing the 64bit version of AutoCAD included on your official installation media (some versions have a separate setup.exe in the x64 folder on the DVD). Most AutoCAD-based CAD products (since 2008) are distributed in both 32-bit and 64-bit versions. These 64-bit versions are officially supported in XP x64, Vista 64 (since 2008) and Windows 7 (since 2010).

Tuesday, November 24, 2009

What is the flag (0-15) in the command alias editor?

The ALIASEDIT command in AutoCAD allows to define new shortcuts (aliases) to internal commands and define (create) new shell commands. For the shell (OS) commands you have to specify a "Flag" (a number from 0 to 15).

This flag is a bit combination of:
  • Bit 1: if set, AutoCAD does not wait for the application to finish
  • Bit 2: if set, the application is run minimized
  • Bit 4: if set, the application is run as hidden
  • Bit 8: if set, the argument string has to be quoted
E.g. 11 means: run minimized, do not wait to complete, parameters are quoted.

See also the ACAD.PGP file.

Network version of AutoCAD displays the error 0.0.0

The license error [0.0.0] is caused by a substantial difference between the system time on the server and on your workstation.

You have to synchronize system time/date on servers and workstations. The workstations (plus AdLM license servers) should use the synchronized system time from the network server. Active Directory users are synchronized automatically.

Cannot hatch an object enclosed by a zigzag line (AMZIGZAG)

If you have closed a drawing object with a zig-zag line (AMZIGZAG) and and now you try to hatch it in AutoCAD Mechanical, you will fail.

The reason is that the AMZIGZAGLINE command creates a zigzag line in the layer AM_4. Object in the layer AM_4 are ignored as valid boundaries in the Mechanical hatch commands (AMHATCH, AMUSERHATCH).

You can solve this by temporary moving your zig-zag lines (or other contents of the AM_4 layer) to another layer. After you hatch the objects, you can return them back to the layer AM_4. You can also use the standard AutoCAD hatch command - BHATCH, which respects the drawing geometry independently of layers.

How to run an older version of AutoCAD or Inventor in Windows 7

Windows 7 is supported in AutoCAD 2010 (and 2011 and higher) and Inventor 2010 (and 2011 and higher). If you want to install and run older versions of AutoCAD, LT, or Inventor (2009, 2008, 2007, 2006, R11...) in Win7, you can use the virtualized "XP Mode" available for Windows 7 Professional, Ultimate and Enterprise (both 32-bit and 64-bit).

To use the Windows XP Mode you will need a CPU hardware support. You can detect the HW virtualization support in your processor with the utility havdetectiontool.exe . The Windows XP Mode add-on (application) can be downloaded from the Microsoft web. Then you can install the tool through Windows Virtual PC > Windows XP Mode.