Custom command to label assemblies in Civil 3D: alab

Download file: alab.zip  

Since corridor files can get pretty busy, a good method to keep assemblies organized is to add mtext “labels” with fields that pull the name out of the assembly object.  This process can be a little tedious since the user has to place the mtext/field, point it to the proper object, select the appropriate field, and repeat that for each assembly.  The end result looks something like this:  

Mtext fields point to each assembly and display the name value.

In order to make the labeling process a little easier, I’ve written a short command to label one or more assemblies, with fields, using only a a single command.  To use this command, download this file and unzip it.  Then follow the instructions from the alab-readme.txt file as shown below:  

Instructions:  

  • Copy the DLL for your version of Civil 3D to a local drive
  • Run Civil 3D and load the DLL with the NETLOAD command.
  • For advanced users, it can also be automatically loaded by adding (command “netload” “c:/yourpath/alab”) to your acaddoc.lsp file.
  • Execute ALAB at the command line
  • Select one or more assemblies

Notes:  

  • Unless you’re very familiar with configuring the dotnet framework, this DLL must be stored on a local drive.  With the stock dotnet configuration, dotnet DLLs will load into your Civil 3D session from a network volume, but they will cause fatal errors when executing the commands.
  • The labels are drawn on the current layer, using the current text style.
  • Versions for Civil 3D 2010 (alab-2010.dll) and Civil 3D 2011 (alab-2011.dll) are included in the zip file.  You only need to load the DLL for your version of Civil 3D.
  • This command is free to use.  There are no warranties.

Civil 3D 2010 Fatal Error at launch (Fatal error e0434f4dh at 7c812afbh)

I’ve been meaning to write about this for some time now, but I just haven’t had the time until now…

I rolled out Civil 3D 2010 to several offices in October of 2009.  Starting in May of 2010, I started to receive periodic reports of 2010 raising Fatal error e0434f4dh at 7c812afbh immediately after it was launched.  In these cases, no drawing files were opened and nothing out of the ordinary took place.  After running Civil 3D succesfully for weeks or months at a time, a user can simply double click on the C3D icon and can’t proceed past the fatal error.

When I submitted a CER on this, Autodesk’s stock response was to let the secondary installer reinitiate the user profile.  Unfortunately, this is time consuming and it’s usually not a simple task for an average end user.  Knowing that the secondary installer just installs clean registry entries and appdata, I decided to dig a little deeper.

Before running the secondary installer, I exported everything under HKCU\Software\Autodesk\AutoCAD\R18.0 to a .REG file so that I could compare a fresh copy of a user profile to one which was creating the fatal errors.  Then, after creating a clean user profile, I chopped the .REG file in half using a text editor.  Then I repeatedly restored half of the .REG file, and half again, until the fatal errors started to reappear.  It took some time, but I eventually zeroed in on the following key:

HKCU\Software\Autodesk\AutoCAD\R18.0\ACAD-8000:409\WebServices\CommunicationCenter\LastUpdateTimeLoWord

By resetting this value to 0, the fatal errors went away.  Over the past ~8 months, I’ve fielded several dozen reports of this fatal error, and in all but on case, setting the above key to 0 solved the issue immediately.  I’ve even helped friends at other firms use the same workaround successfully.

One of our other offices also runs vanilla AutoCAD 2010 and I’ve seen similar reports, albeit less frequently.  The same dword for AutoCAD 2010 can be found here:

HKCU\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\WebServices\CommunicationCenter\LastUpdateTimeLoWord

There is one unexplainable aspect to this workaround.  After I had seen several instances of this behavior, I started to document the value that was stored in LastUpdateTImeLoWord.  For example, on August 16, 2010, one user couldn’t launch Civil 3D 2010, and I noted that LastUpdateTimeLoWord was set to 1281970257 (decimal) in his registry.  I reset it to 0 to get him back up and running.  However, manually setting LastUpdateTimeLoWord to 1281970257 (decimal) on any other system, or under any other user profile doesn’t seem to cause fatal errors all by itself. 

I should note that over in the Autodesk discussion groups, there are several reports of similar fatal errors at startup, but at different addresses.  Your mileage may vary if you try this workaround for any fatal errors other than Fatal error e0434f4dh at 7c812afbh

We haven’t deployed 2011 in production yet, and I haven’t seen the same fatal errors on my test systems.  I can say that I have had Civil 3D 2011 get into an “not responding” state immediately after launching, but without any fatal errors.  When I saw this, I set the equivalent dword to 0 (HKCU\Software\Autodesk\AutoCAD\R18.1\ACAD-9000:409\Webservices\CommunicationCenter\LastUpdateTimeLoWord) and then I was able to run C3D 2011 successfully.  I admit, though, that I haven’t seen enough cases of this on 2011 to be able to say definitively whether or not this key was responsible.  I may have just jumped the gun on killing the acad.exe process.

To summarize, to clear out this particular error in the 2010 versions, copy the following to a text file with the .REG extension and then double click on it when logged in as the affected user:

For Civil 3D 2010:

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8000:409\WebServices\CommunicationCenter]
@=""
"LastUpdateTimeLoWord"=dword:00000000
"LastUpdateTimeHiWord"=dword:00000000

For AutoCAD 2010:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R18.0\ACAD-8001:409\WebServices\CommunicationCenter]
@=""
"LastUpdateTimeLoWord"=dword:00000000
"LastUpdateTimeHiWord"=dword:00000000

Missing Language Pack – ACAD.VLX Virus?

In an office full of US English seats of Civil 3D, our users frequently see a dialog which reports a missing language pack when opening DWG files.  I can only assume that at one time a drawing file did contain an object which was worked on in a non-english version of AutoCAD or Civil 3D.  Since we’re seeting this more frequently, I’m a little concerned this might turn out to be yet another piece of contagious “CAD Debris” (such as Named Layer Filters [2000-2002], Scale Lists [2008], and unused RegApps [ongoing]).   According to Matt’s post in this thread, which details Autodesk’s explanation of this issue, it sounds like it’s fairly benign and the user can feel comfortable by checking the “don’t show me this again” checkbox (or, alternately, actually installing the Windows language pack).

However, it has recently come to my attention there there is also an AutoCAD specific virus being distributed in a file called ACAD.VLX which also causes the Missing Language Pack dialog.  Autodesk recently posted an article about the virus.  After following the steps outlined in the article, I determined that we do not have the infected acad.vlx file so my Missing Language Pack dialog is likely caused by an actual object in the drawing file(s).

What bothers me about Autodesk’s article about the ACAD.VLX virus is that there isn’t much information and I still have plenty of questions:

  • What is the method of infection and how is the evil ACAD.VLX being distributed?
  • Other than the “Missing Language Pack” dialog, is there any additional payload?
  • What can users do to prevent infection?
  • Do over the counter virus scanners catch this virus?

Surfaces which should yield one single minor contour don’t show any contours

In Civil 3D 2009, any surface which uses a style under which only one minor contour would show for the entire surface, no contours are shown.

This is very difficult to explain verbally, but the image below illustrates the problem.

Missing_Single_Minor_Contour


Workarounds:
Create a temporary style which shows major contours at the interval that you would typically show minor coutours with. Make those major contours the same color/layer/linetype as your regular style’s minor contours. Apply the new temporary style to the problematic surface.

First Appeared: Civil 3D 200x?
Status as of Civil 3D 2009 version 2: Still reproducible
Status as of Civil 3D 2010: Resolved

2d solids do not observe fillmode withinin certain layouts

Since rolling out 2009 to a large userbase, we have encountered several drawing files which contain specific layouts within which any viewport will not show filled 2d solids properly. This behavior seems to be specific to AutoCAD 2009. The same drawing files behave as expected in AutoCAD 2008 (and, presumably, earlier releases).

Although fillmode is turned on, a viewport within an affected layout will show 2d solids like so:

fillmode

Of note:

  • fillmode is set to 1
  • All viewports are set to 2d wireframe / hideplot is turned off in all of the viewports
  • I do have raster design 2009 installed. Neither the “filled object hotfix” nor SP1 corrected the problem
  • An example drawing can be found here: http://www.texupport.net/acad_examples/fillmode.dwg

Workarounds: Recreate the entire layout, including the viewports and any paperspace annotation.
First Appeared: AutoCAD 2009
Status as of AutoCAD 2009 version 3.1: Still reproducible.

Most Recently Used Documents fills up with DST files

Starting with AutoCAD 2009, the most recently used files list is designed to list both DWG and DST files.  Unfortunately, once nine (cumulative) DST files have been opened by one user, then the most recently used documents list will no longer contain drawing files. 


Workarounds:
I wrote this command to completely reset the MRUF list.  This will remove all entries from the list.  Over time, be prepared for it to be populated by nine DST files again.  When that happens and it gets to be too annoying, simply re-run the command.  (Note: I’ll add the LSP file to the downloads section ASAP.)

;;Reset Most Recently Used Files
;;This utility can be used to clean out the mess that 2009 and 2009v2 leaves in
;;the Most Recently Used Document list after opening nine or more DST files
;;absolutely no warranty
;;feel free to modify as necessary
;;I use this only periodically.  I run it manually when my Recently Used Files list gets filled up with DST files.
;;v2008.12.01
(PRINC “Reset Most Recently Used Files (rmruf) v2008.12.01 – www.texupport.net“)
(DEFUN c:rmruf (/ regkey mruf)
 (SETQ mruf (GETENV “MRUFilesToList”))
 (SETENV “MRUFilesToList” “0″)
 (SETQ regkey (STRCAT “HKEY_CURRENT_USER\\” (VLAX-PRODUCT-KEY) “\\Recent File List”))
 (VL-REGISTRY-DELETE regkey)
 (SETENV “MRUFilesToList” mruf)
 (PRINC “\nMost Recently used files list has been reset.”)
 (PRINC)
) ;_ end-defun


First Appeared
: AutoCAD 2009
Status as of AutoCAD 2009, version 2: Still reproducible

Hacking the Nvidia performance driver (powerdraft) into Civil 3D

Several months ago, Nvidia released a performance driver for AutoCAD 2009. Unfortunately, using the included installer, this driver can only be installed on AutoCAD. When you only have Civil 3D installed, you get an error which reads, “Setup was unable to find an installed version of AutoCAD 2009.”

nvidia-01

I was able to hack the driver in to my Civil 3D 2009 installation on an XP (32) system by doing the following:

  1. Download Powerdraft2009_XP_Vista_32_64.exe from nvidia’s website.
  2. Run the install program and let it error out as noted above.
  3. At this point the install program has actually unpacked the archive to a directory called C:\04-28-2008-0710\ navigate to C:\04-28-2008-0710\Disk1\win32 and copy all of the files from that location to C:\Program Files\AutoCAD Civil 3D 2009\Drv
  4. Finally, back in Civil 3D, run 3DCONFIG and select the new Nvidia specific driver for either Direct3D or OpenGL.

nvidia-02

Unfortunately, since I don’t have a supported video card on my notebook, I haven’t had the opportunity to test this workaround with Civil 3D 2009 (a 32 bit application) on Vista x64.

RegappID cleanup utility

It just came to my attention that Autodesk quietly released their own RegApp cleaner a couple of months ago. This still doesn’t do anything to prevent Registered Application IDs from propagating through xrefs and inserts so unless you clean everything that your file might come into contact with, you can count on getting infected with AppIDs over and over again. Still, along with the -purge R option that was reintroduced in 2005 or 2006 (after a very long absense), it’s a step in the right direction.

Autodesk’s CleanupRegApp tool isn’t any more or less effective than cadthinking’s PurgeIDs, and in fact, its interface is lacking compared to PurgeIDs. Still, it’s nice to know that this is an Autodesk developed (and, presumably, Autodesk supported) tool to address a problem that has been swept under the rug for far too long.

Importing color images from Google Earth into Civil 3D

Since Civil 3D added the ability to import georeferenced imagery from Google Earth, I regularly get comments from users who would prefer the image to appear in color. While it doesn’t appear to be a feature, with a little hacking this is actually very easy to do.

First, open your Civil 3D drawing file and make sure to set the coordinate system properly.

 

GE-C3D-1

 

Then open Google Earth and navigate to the area that you’d like to import. Once you’ve centered on your project area, go back to Civil 3D and go to File -> Import -> Google Earth Image. When prompted, specify coordinate system for the image location. At this point, the georeferenced image is dropped in at the appropriate northing and easting coordinates. Unfortunately, it is in black and white.

To create a color image file, go back to Google Earth, and being careful not to reorient the display, hit CTRL-ALT-S to save the image. Save this jpg to your relevant project location.

 

Back in Civil 3D, open the xref palette and find the Google Earth image. Hit the “found at” button to respecify the image file location.

 

GE-C3D-2

 

Point the image reference to the color jpg by selecting the file that you saved earlier. Finally, perform a regen and the color image will appear in the proper location.

 

GE-C3D-C

Sheet set templates must have have all lowercase dst extension

When  creating a sheet set template by placing a DST file in the SheetSetTemplatePath location, the file must absolutely have an extension of .dst (case sensitive).

 

dst_3

 

If an uppercase character exists in the extension, the sheetset template appears with the extension in the listbox and the system will then search for YourTemplateName.DST.dst. 

 

dst_1

 

When it doesn’t find the template, a “File Not Found” dialog reports “Cannot find the specified sheet set data (DST) file.”

 

dst_2

 

Workarond:
Create sheet set templates with a lowercase dst extension.

First Appeared: Unknown
Status as of AutoCAD 2009 version 3: Still Reproducible.

Running history of new features in AutoCAD which failed to deliver

Ever since AutoCAD went to the one year releases, I’ve been pretty critical of how rushed all of the new features have been. This is a running list of all of the new heavily touted “bullet list” features which failed to deliver.

 

2005:
New Feature: Hatch Gap Tolerances (HPGAPTOL)
Incomplete implementation: Works in simple figures where users wouldn’t need it to work, but simply doesn’t work on figures where most users we would need such a feature to work. As of 2009, it is no better than it was in 2005.
Result: Most customers can’t use it which makes them revert to 2004 techniques.

New Feature: Background mask property
Incomplete implementation: Doesn’t work when printers are set to “lines merge”
Result: Many customers still have to use wipeouts, which do work with “lines merge.” Again, this essentially forces many users to revert to 2004 techniques.

New Feature: Sheet Sets
Incomplete implementation: Publishing can be painfully slow when there are several page setups which refer to several plotters. Often, the publish dialog can take several minutes to appear. Also, DST files on networks are still known to cause performance issues.
Result: This really is a useful feature, but incomplete aspects noted above weren’t improved in 2006, 2007, 2008, 2009.
New Feature: Dynamic input
Incomplete Implementation: Should have been more useful than it is. There are still issues with overlapping values and sluggish performance. Done right, it could have been as great as autosnap markers.
Result: With each rollout, I field dozens of calls asking how to turn it off and revert to 2005 behavior.


2006:
New Feature:
CUI/Workspaces
Incomplete implementation: Simply wasn’t thought out very well from a workgroup point of view. The enterprise/main division is very cumbersome, not to mention enterprise partial and main partials, the fact that workspaces are stored in the CUI file, and many other overdesigned aspects. Visit this thread for user complaints on this feature. This wasn’t just a case of users being resistant to change. The thread started over two years ago and it’s still being posted to.Main, partial main, enterprise, partial enterprise? Hacked ICON.DLLs? Workspaces in main and enterprise but not partials? LIFO conflics? Can’t edit workspaces when “automatically save changes to workspace is on? “Save current as” saves the current space as “start on”? Cumbersome ACLs for enterprise/partial? .. What a convoluted mess! Novice to semiexperienced users simply want this: How can I drag these three buttons from this toolbar to that toolbar like I did in 2005? That’s it and that’s all.

FWIW, the CUI feature has always reminded me of the Simpsons episode when homer’s long lost brother allows him to design a better car that “the people” would buy and they end up with this. (In case you don’t remember, the car ended up with a sticker price of over $40,000 and the company went bankrupt).
New Feature: Built-in PDF driver
Incomplete Implementation: Didn’t work well then and doesn’t work well now. Huge margins, poorly translated lineweights, objects in paperspace layouts can appear on the wrong PDF page.
Result: Many/most users resort to using a 3rd party PDF driver, just as they had to do in 2006.

2007:
New Feature: xref palette
Incomplete implementation: Simply selecting an image in the list creates excessive “image processing,” even when the image is unloaded and/or on a frozen layer. Doesn’t work when SDI is turned on (as some verticals still force).
Result: Many users have to resort to the 2006 method of using CLASSICXREF.
New feature: PUBLISHCOLLATE variable is supposed to allow users to send one multi-page print job (1) or several one page print jobs (0).
Incomplete implementation: known to cause fatal errors
Result: For many users, publishcollate must be left at 0 which completely disables the new feature and reverts to the behavior of the previous version.

2008:
New Feature: annotative mtext
Incomplete Implementation: Doesn’t work with the lisp function (entmod) which means that many firms either can’t use their existing customizations or can’t use the new feature. Also, many annotative entities can’t be manipulated until a drawing is audited. Many users simply couldn’t live with the quirks, didn’t have time to invest in developing in-house workarounds and gave up on the feature.
Result: As stated, for firms who have existing customizations, the new feature can’t be used and users must revert to 2007 and earlier techniques.

New Feature: annotative scales -
Incomplete Implementation: Generally caused tons of CAD debris that will have to be fought off for years to come – and that debris was only introduced in the short period between 2008 and 2008SP1.

New Feature: mleader
Incomplete Implementation: Extremely quirky, even in SP1. Sometimes when the text width is modified, its location pops to a random position. Also, you can’t use a field within mleader text and have it justify to middle.
Result: Many users had to pass on this feature until it was more completely implemented, which meant that they had to revert to the 2007 (and earlier) quickleader techniques.

New Feature: multiline attributes
Incomplete implementation: Arbitrary code can bleed through into the displayed value; attribute position can jump anound.
Result: Many users gave up on the feature and had to revert to using single line attributes as they had to in 2007 and earlier.
New Feature: Extended tooltips
Incomplete implementation: Undoubtedly cause sluggish performance. There is no way to only turn off said verbose tool tips.
Result: Tooltips must be turned off completely, which mimics a circa R12 environment.

2009:
New Feature: Ribbon interface
Incomplete implementation: The ribbon, its tabs, and panels have to be in the “main” CUI file.
Result: A step back for people who had been using the dashboard.

New feature: DST files are added to most recently used files list
Incomplete implementation: After 9 sheet sets have been opened, only dst files will show up in the most recently used file list.
Result: New feature leaves users worse off than with previous version

New feature: Layer Manager Palette
Incomplete implementation: Severe performance issues when leaving palette docked
Result: Users do not realize any benefits from new feature. Palette must either be closed after each operation, or use classiclayer/LAYERDLGMODE=0. Each of these operations reverts to an environment similar to 2008 and earlier releases.

Dragging child styles can create a \”multiply owned object\” warning

   1. New drawing from acad.dwt
   2. Save as ADVANCED.dwg
   3. Create a general line label style named PARENT
   4. Qsave ADVANCED.dwg
   5. Right click on the PARENT style and select New…
   6. Save the child style as CHILD
   7. Qsave ADVANCED.dwg
   8. New drawing from acad.dwt
   9. Save as BASIC.dwg
  10. Drag the PARENT style into BASIC.dwg
  11. Qsave BASIC.dwg
  12. Drag the CHILD style into BASIC.dwg
  13. Qsave BASIC.dwg
  14. Check the command line for the error message:  *Warning* Multiply owned object, handle “###”

Autodesk Service Request: SR#:1-3648349943
Submitted By: TommieR
First Appeared: Civil 3D 2009 (verified on XPSP2 [32], Vista 32, and Vista 64)
Status as of Civil 3D 2009 Update 1 (aka Civil 3D 2009, Version 2): Resolved

Warning: An error occured during save

“Warning: An error occured during save” arises when saving a drawing which contains a style which was created with a layer from another “layer source” drawing.

1.  File new from _AutoCAD Civil 3D (Imperial) NCS Extended.dwt (drawing2.dwg) 2.  File new from acad.dwt (drawing3.dwg) 3.  Under toolspace/settings for drawing3.dwg, right click on General-Label Styles-Line and select New.
4.  General tab, left click on the box next to Layer that currently contains 0, then click on the … to the right.
5.  Left click on Drawing3.dwg under Layer source at the top left of the Layer Selection dialog and select Drawing2.dwg.
6.  Select C-ANNO then OK and OK and save the drawing as temp.dwg.

This results in an AUTOCAD Message box with this text:

Warning:  An error occured during save.
We recommend that you run RECOVER on the drawing.

Workarounds:
… bring the layer into the new drawing prior to assigning it. … This, unfortunately, negates the functionality of using “layer source”.

Autodesk Service Request: SR#1-3608470141
Submitted By: TommieR
First Appeared: Civil 3D 200?
Status As of 2009: Still Reproducible
Status as of Civil 3D 2010: Resolved

“Middle of Text” mleader connection doesn’t work when text attachments contain fields

When using a multileader style with the leader connection point set to “middle of text,” the text attachment point jumps to the “middle of the top line” when any field is added to the text.

Figure 1 – Middle of Text justified mleader

nofield

Figure 2 – The same mleader with a field added

withfield

Thanks to Christian Billiot for submitting this report.

Workarounds: None Known

First Appeared: AutoCAD 2008
Status as of 2009: Still reproducible

Hatch Island Detection is incorrect when hatching around MTEXT entities

Under certain circumstances, the hatch command’s island detection feature does not work when mtext entities are contained within the area to be hatched.

Steps to reproduce:

   1. Create two mtext objects with this text (include a return after each word):  test centered text
   2. Set the width on both mtext objects to 0.
   3. Change the first mtext object to be middle centered justified.
   4. Edit the second mtext object:
   5. Select All
   6. Select the “Center” icon on the Text Formatting toolbar
CenteredTextb
   7. Both mtext objects look the same at this point.
   8. Draw a rectangle around each mtext object.
   9. Hatch inside each rectangle (allowing island detection).
  10. While the island detected around the middle justified text is correct, the border around the center justified text is incorrect.
CenteredTexta

Workarounds:
Either use middle justified mtext entities or do not use zero with mtext entities.

First Appeared: Unknown.  Bug didn’t exist in 2004, but is easily reproducible in AutoCAD 2008.
Status as of 2008SP1: Still reproducible

Submitted By: TommieR

Bhatch does not find a hatch boundary

Ever since bhatch was introduced in R13, it has had trouble finding the boundary of many areas which are bound by arcs or polylines with arcs.  This bug seems to be more troublesome the farther the linework is away from the UCS origin.  It appears to be worse still when the linework is far from the WCS origin (such as any geospatial drawing).  Over the past 14 years, the user community has come up with numerous workarounds to coax results from the bhatch command.  Unfortunately, no single workaround works in all cases.  Furthermore, none of these workarounds make sense to younger users who have never had to massage results from their software and have grown to expect applications to “just work.”  These workarounds are documented below.
 

Workarounds:

  • If the linework is polylines, sometimes it helps to explode them before hatching
  • If the linework is lines and arcs, sometimes it helps to convert them to polylines before hatching
  • Sometimes it helps to temporarily set the UCS closer to the current view *
  • Sometimes it helps to temporarily move the linework closer to the WCS origin
  • Sometimes it helps to continuously cut the figure that won’t hatch into halves and hatch each half until a “leak” is found
  • You should always to check the entities in question for an “extrusion direction” and if they have one, remove the extrusion direction with the express tools FLATTEN command. 
  • HPGAPTOL almost never works

First Appeared: When bhatch was introduced in R13 (1994).  It’s possible that the hatch command from previous releases exhibited the same symptoms, but I simply can’t remember.
Status as of 2008 SP1: Still reproducible.

* I have written a short lisp command which automatically sets the UCS close to the current view, runs the bhatch command, and then sets the UCS back.  Although it still fails in many of the same situations that cause the “out of the box” bhatch command to fail, it definitely does a better job than the default command in many cases.  In particular, it sheilds the users from quite a few hatch errors when working in geospatial drawing files.  The code is as listed below.  I’ll add it to the downloads section as time permits.

;; bbh.lsp (Better BHatch)
;; ralph sanchez (rsanchez at texupport dawt net)
;;
;; As most users know, AutoCAD has trouble hatching anything but simple figures when working far from the WCS origin
;; The user community has come up with several workarounds and this code attempts one of the most common.
;; In short, it will temporarily change the UCS to the current view before executing the bhatch command.
;; As with all of the workarounds, it is not perfect and does not work in many situations.
;; It does, however, work better than the default bhatch command.
(DEFUN c:bbh (/ ucsorg ucsx ucsy)
  (DEFUN savars (sv0 / x)
    ;;excellent savars/revars functions from paul turvill
    ;;(prevents user ESC from killing variables)
    (COMMAND “._undo” “begin”)
    (SETQ svx1  nil
   olderr *error*
    ) ;_ end-setq
    (FOREACH x sv0 (SETQ svx1 (APPEND svx1 (LIST (LIST x (GETVAR x))))))
    (SETQ ucsorg (GETVAR “UCSORG”))
    (SETQ ucsx (TRANS (LIST 1 0 0) 1 0))
    (SETQ ucsy (TRANS (LIST 0 1 0) 1 0))
    (DEFUN *error* (msg) (revars))
  ) ;_ end-defun
  (DEFUN revars (/ x)
    (SETQ *error* olderr)
    (FOREACH x svx1 (SETVAR (CAR x) (CADR x)))
    (SETQ svx1 nil)
    (COMMAND “._ucs” “3p” (TRANS ucsorg 0 1) (TRANS ucsx 0 1) (TRANS ucsy 0 1))
    (PRINC)
    (COMMAND “._undo” “end”)
  ) ;_ end-defun
  ;;******************************************************
  (savars ‘(“cmdecho”)) ;’saves variables to be reset later
  (SETVAR “cmdecho” 0)
  (COMMAND “._ucs” (GETVAR “vsmin”) “”)
  (INITDIA)
  (COMMAND “bhatch”)
  (WHILE (= (LOGAND (GETVAR “cmdactive”) 1) 1) (COMMAND pause))
  ;;****************************************************** 
  (revars)
  (PRINC)
) ;_ end- defun

Spline option in PEDIT command doesn’t work after join has been executed

After joining lines or polylines within the PEDIT command, the SPLINE option can’t be run until the command is ended and reexecuted.

Steps to reproduce:

  • Draw three lines which meet end to end
  • Enter PEDIT (if peditaccept is turned off, hit “y”)
  • Select J to join the segments
  • Select S to spline the resulting polyline
  • Notice that the command is exited

 

Workarounds: Exit the PEDIT command after joining the segments, then reexecute PEDIT and select S to spline.

First Appeared: 2007? (This bug is definitely not evident in 2004 and is known to exist in 2007.  Its status in 2005 and 2006 is unknown)
Status as of 2008 SP1: Still reproducible.

Thanks to Opie for submitting this report.

Several Map Menu inquiry commands do not work

In Civil 3D, several of the inquiry commands under the map menu don’t work:

Map-Inquiry-Line and Arc Information
Map-Inquiry-Angle Information
Map-Inquiry-Continuous Distance
Map-Inquiry-Add Distances
Map-Inquiry-List Slope

 

Workaround:
Use the equivalent Civil 3D commands as documented below.

MAP MENU           CIVIL 3D TOOL
COMMAND            COMMAND
mapcglist    ==>   cglist
mapcgang     ==>   cgang
mapcgcdist   ==>   cgcdist
mapcgadist   ==>   cgadist
mapcgslist   ==>   cgslist

Alternately, you can use the commands under the Map menu in Land Desktop or Land Enabled Map

First Appeared: Civil 3D 2007
Status as of Civil 3D 2008 Sp2:  Still reproducible
Status as of Civil 3D 2009: Still reproducible

Submitted By: TommieR and Christian Billiot

Text in Curve Label Style doesn’t align with its border and mask

  1. Create a Curve Label Style with the following settings:
    • Allow Curved Text = true
    • Border Visibility = true
    • Background Mask = true
  2. Before you OK the label style, you’ll notice that the border is not going to be correct.
  3. Draw an arc.
  4. Place the curve label style on arc and check the location of the border and the background mask.

The background mask matches the border, but neither matches the text.  It works fine if you don’t use “Allow Curved Text”.

 

Workarounds:
… add two spaces before the start of “L=….” in the Contents row.  This will take care of the border overlapping the “L”, but unfortunately, does not address the extra masking being added at the end of the text.

Autodesk Service Request: SR#:1-3618052813 
Submitted By:
TommieR
First Appeared: Civil 3D 2007?
Status as of Civil 3D 2008 SP2: Still reproducible.
Status as of Civil 3D 2009: Still reproducible.

Point label style arrowheads don’t work through xrefs

  1. Create a new drawing from the acad.dwt drawing template.
  2. Set the annotation scale to 1″=40′.
  3. Place some points manually.
  4. Drag the labels of the points so that the leader arrowhead is visible.
  5. Create a new Point Label Style with the dragged state arrowhead set to origin indicator 2.
  6. Change the Point Label Style of the manually placed points to the new Point Label style.
  7. Save the drawing (Points-1.dwg).
  8. Create a second drawing from the acad.dwt drawing template.
  9. Save the drawing as (Sheet-1.dwg).
  10. Set the annotation scale to 1″ = 40′.
  11. Overlay the first drawing (Points-1.dwg) into the second drawing.
  12. Zoom extents and view the arrowheads.

The arrowheads revert to closed filled when viewed in the xref drawing (Sheet-1.dwg), but are still origin indicator 2 in the original drawing (Points-1.dwg). 

Workaround:
The current work-around is to use the origin indicator 2 as the marker style but that leaves a gap between the end of the leader and the marker.

Autodesk Service Request: SR#:1-3618052864
Status as of Civil 3D 2008 SP2:
Still reproducible.
Status as of Civil 3D 2009: (unknown)

3gb switch breaks map-image-insert for georeferenced raster images

1.  Take a computer with 4GB RAM.
2.  Start the OS with the /3GB switch enabled *
3.  Start Civil 3D 2008
4.  Map-Image-Insert
5.  Select a tiff with a world file attached, or a SID file
6.  Let the error messages begin…

Note – this behavior also takes place when using x64 Windows (which doesn’t require the /3GB switch) as noted on “Civil 3D for Beginners

 

Workaround:
Either don’t use /3gb switch with the OS or use Raster Design to insert georeferenced raster files.  Alternately, you can try to use the Add Raster Image or Surface Connection from the Map Task Pane.

Autodesk Service Request: SR#:1-3608470203
First Appeared: Civil 3D 2008?
Status as of Civil 3D 2009: Still Reproducible.
Status as of Civil 3D 2010: Resolved

Missing Dialog Boxes

When using any version of AutoCAD with two monitors or a monitor and a projector, it’s possible to position any dialog box on the secondary monitor.  This works great until you have to go back to one monitor for whatever reason.  (It does happen, particularly after using a projector).  If you find yourself with missing dialog boxes, you can reposition them by editing their position in the Windows registry.

 

Workarounds:
Note that all of the standard windows registry warnings apply:  You can severaly damage your system if you edit the wrong system setting in the regitry.  Only people very comfortable with registry editing should attempt this workaround.

  • Shut down AutoCAD
  • Start the registry editor and navigate to hkcu\software\autodesk\autocad\rxx.x\acad-xxxx:xxx\profiles\youruserprofilename\dialogs
  • Under the dialog tree, you’ll see a list of all of the AutoCAD dialog boxes.  Find the one that has disappeared from your screen and directly edit its location and/or size.

Incorrect grading criteria can cause fatal errors in Civil 3D

Numerous errors in user input are known to cause fatal errors in Civil 3D.  Most recently, I’ve noticed that incorrect grading criteria can cause an unhandled exception.

 

Steps to reproduce:* Create a grading criteria to grade to a relative elevation of +5′ at 0% grade.
* Grade from any feature line using this criterea.
* Wait several minutes.
* Watch C3D produce a fatal error

 

Admittedly, this is an error in user input, but Civil 3D should do standard error checking to catch user error.  For comparison, enter =5/0 in a cell in excel, and it will immediately return #DIV/0! without crashing.

Workaround:
Never make mistakes.

First Appeared:
This was first reported to me in Civil 3D 2008 SP2, but I suspect it has been around since the beginning.
Status as of Civil 3D 2009: (unknown)

Locked viewport not honored

Steps to Reproduce the issue:
1.  Create a viewport in a layout that is zoomed into a certain area in model space.
2.  Lock the viewport.
3.  Change to model space within that layout.
4.  LandXML import or data shortcut create reference an object into the drawing.

What is the problem?
The locked viewport “zooms to extents” of the object imported.  You have to unlock the viewport, fix it, then lock it again.

What were the expected results?
Create the object without zooming extents or switch to model tab before importing object.  Adding a warning about switching to Model tab with cancel option would be even better.

 

Submitted By: TommieR
Autodesk Service Request: SR#:1-3618052751
First Appeared:
Civil 3D 2008
Status as of 2008 SP2: Still reproducible
Status as of 2009: Still reproducible

MOVE TEXT / NO LEADER override doesn’t work w/annotative dimensions

In properties for the an annotative dimension entity, change the “text movement” property to “move text, no leader,” then save, close and reopen. After reopening, grip edit the text portion of the dimension, and notice that the “text movement” property changes back to “move text, add leader.”

My testing has confirmed this bug in C3D, LDT and MAP 2008, but not necessarily AutoCAD 2008.

 

Workarounds: Use a dimension style set to “move text, no leader,” rather than using the property override.

First Appeared: Map 2008, C3D 2008, LDT 2008
Status as of 2008 SP1: Still reproducible.
Status as of 2009: (unknown)