Random glitches, flat ucs and icon solid hatch

A colleague of mine could not hatch dots on a drawing at a higher density. I tried the usual regen and measurement commands to see if it was the hatch itself, however it was not to do with this.

After searching it could be a variable issue in the drawing but the drawing was from our standard template, but worth checking to see if HPMAXAREAS and HPMAXLINES were set to low values. They were not.

After further searching it became apparent that the drawing was a long way from the origin causing the glitches. This was apparent because the x leg of the UCS icon kept disappearing on zoom when in world UCS.

The glitches were:

  • Hatches not hatching properly at higher densities
  • ONSNAP not working properly
  • Fillet and trim not working properly

The solution was to create a drawing UCS closer to the drawing that fixed these glitches.

Indesign relinking alters size of images

If you are importing PDFs of AutoCAD drawings into Indesign to say create a presentation and you update one of the drawings that has been scaled to fit in a frame and is exactly the size you want it to be and then you relink and run into the following problem.

AutoCAD drawing is the same scale 1:1. The plot is the same size and the plot scale is the same size but when re-linking the drawing you find Indesign has unhelpfully resized the image to a random size. This is probably really useful if you do a lot of swapping the same images around at different resolutions but not helpful in this case.

Here you need to change the preferences.Go to file handling and deselect preserve image dimensions when reloading. Thank you David Blatner.

Creating a default layer sheet

As part of my preparing an AutoCAD drawing for my office’s layering system I managed to insert layers into a drawing from Excel using only scripting.

However the creation of a line and a text on each of the layers, so that users can copy and paste to get the layers etc. into new drawings, needed full AutoCAD and its access to LISP to create these quickly.

The script below is a modified (larger text and longer lines) version of a script, kindly written, from here.

(defun c:lintextfromlayer (/ pt dat ln)
(setq pt (getpoint “\nSelect insertion point: “))
(while (setq dat (tblnext “layer” (null dat)))
(entmake (list ‘(0 . “line”) (cons 10 pt) (cons 11 (mapcar ‘+ pt ‘(5000 0 0))) (cons 8 (setq ln (cdr (assoc 2 dat))))))
(entmake (list ‘(0 . “text”) (cons 10 (mapcar ‘+ pt ‘(5200 -125 0))) ‘(40 . 250) (cons 1 ln) (cons 8 ln)))
(setq pt (mapcar ‘- pt ‘(0 1000 0))))


Excel to AutoCAD layers

I have been attempting to update our office’s layer system. This would be difficult to do in AutoCAD without resorting to LISP or some programming to insert layers on mass. Creating lots of text on mass is really easy to do in Excel so that would be the program of choice to do this task.

The problem then comes of getting these layers into AutoCAD? There are numerous Lisp programs around on the internet to do this but what if you have AutoCAD LT only (as it lacks programming APIs)?

You can use Excels powerful cell commands to convert your layer list to a format that will then be able to create a script file. Below I will go through the steps you need to do to get this to work. (Note this is not my concept but I cannot find the original page where this was proposed).

Firstly create a blank Excel document.

Then place “-LAYER” in the 4th column over.

Now we are ready to input some data into the first three columns. This is in the order, layer name, colour, linetype. Make sure the second column for colour is text only to avoid any true colours being converted into numbers.

One completed we will now enter the following command below the cell with -layer in.

=IF(ISNUMBER(SEARCH(“,”,B2)),”N “& CHAR(34)&TRIM(A2)& CHAR(34)&” C T “&TRIM(B2)&” “& CHAR(34)&TRIM(A2)& CHAR(34)&” LT “&TRIM(C2)&” “& CHAR(34)&TRIM(A2)& CHAR(34),”N “& CHAR(34)&TRIM(A2)& CHAR(34)&” C “&TRIM(B2)&” “& CHAR(34)&TRIM(A2)& CHAR(34)&” LT “&TRIM(C2)&” “& CHAR(34)&TRIM(A2)& CHAR(34))

This creates the magic that is script. (Note the quotes are required for layer names with spaces).

Add layer information down the left and drag the little square in the bottom right of the excel cell to copy this to all cells below.

Once completed, save this file for future reference.

Copy the entire column of D and paste to a new file using paste values only.

Now the file is ready to become a script. Save as Formatted Text (space delimited) PRN file.

You should now have a text file that has the entire script for making your layers you need in it. Two steps to go!

Firstly we are going to rename the extension on the file (if you cannot see extensions follow this). This needs to be renamed from myscript.prn to myscript.scr.

Then open the file and add a return at the very end to create another line. This will terminate the last command and thus end the script.

Finally we load the script into AutoCAD using the command “script“.

Voila, all the layers are now in AutoCAD.

Xerox Printers AutoCAD Transparency Update

Recently we had Xerox printers installed and we could not get the transparancy to play nice with the printer, printing a small strip up the side of the page. We have now found a solution to the problem and after installing PS drivers and changing the settings on the driver page under the PC3 we use to the settings noted below all works fine. Thank you to placidrefining for their solution, which can be found on the following page. Whilst they note that this works with a 7970 printer, we have found that it works with our model as well.


I have posted the images below from that post here for reference.





Hatch ribbon slow to load

So the hatch ribbon is slow to load? I found that the addition of custom hatches on a network path was the cause of the issue. Remove the network related path from the support files and the hatch command speeds up considerably. This seems to be a similar problem to that of the MTEXT problem I have encountered previously.

AutoCAD Broken File Associations

We upgraded AutoCAD LT 2015 to AutoCAD 2017 in the office by installing 2017, then carrying across settings and uninstalling the old one. On the first few PCs this worked OK but then it broke the Explorer file assciations horribly.

It produced an error along the lines of Cannot find AutoCAD LT 2015. Which was of course obvious because it was no longer on the machine.

After searching for the answer, this thread suggested wiping the machines, which currently was not an option.

The next option was to re-associate the files with AutoCAD rather than DWG launcher. This is really annoying solution as everytime you double click in explorer it launches a completely new process of AutoCAD which is very resource heavy when launched lots of times. This however was our temporary fix.

After some research, here is the solution if file associations in Explorer for AutoCAD are broken. This a tweaked version of what is shown on this page.

Fire up regedit (note you can break things with regedit, you have been warned!)

  1. Press WINDOWS-R on the keyboard to bring up the Run window, enter REGEDIT and click OK.
  2. Navigate to the following folder:
  3. Select the sub-key folder under “apps,” including the long string of numbers and letters that identify your version of AutoCAD.
  4. On the right pane, verify that the “OpenLaunch” key contains the path to the correct acad.exe file. Double-click and edit if necessary – this bit you need to change 2015 to 2017.


  5. On the left pane, right-click the folder with the long string of numbers and choose “Copy Key Name.”
  6. Select the “apps” folder, and in the right pane, double-click (Default).
  7. Delete the current data value and paste the key name that you copied. Be sure to remove the folder path that precedes the key name.
  8. Click OK and close the Registry Editor window.

I found at this stage nothing seemed to have changed. So ensure that you right click and go to choose another app.


Once on the choose another app bit click on AutoCAD DWG Launcher and click Always use the app.


This should mean that now when you double click DWG files AutoCAD LT 2017 will launch and all will work properly. You might find as we did that AutoCAD LT 2017 went through the initial start-up and migration settings again. Click always associate DWG files with AutoCAD LT if this box comes up.

You might find at this stage that your icons are still blank. No worries. Reboot.

Once rebooted we found when we double clicked that the “How do you want to open this file” box came up again. We clicked AutoCAD DWG Launcher and all the icons suddenly appeared.

Hope this fix works for you!

Polyline doesn’t plot its lineweight

Today a colleague of mine could not plot a polyline at the desired lineweight. We tried different layer with the colour changed to see if was the plot style interferring. Tried turning off scale lineweights. Tried overriding the lineweight on the object itself.  Tried a new plot style.

After all these attempts it occured to me that the polyline thickness might have a impact on the lineweights and it does.

Altering the polyline global width to 0 meant the lineweight now plotted correctly.

Plot transparency and Xerox printers

We had new printers in today, they were Xerox machines. They are quiet neat but not particularly useful when printing from AutoCAD. The reason why? Because for some reason AutoCAD and the Xerox drivers do not play nice with each other when printing with transparency.

When printing with transparency checked in the plot dialog the Xerox printers just print a small section of the page, about a 5th. Without that checked all is good.

The reason seems that AutoCAD prints vectors normally but when transparency is checked is prints rastors. For some reason this does not play well with the Xerox.

On this post on the second page are some settings but they are not on my driver version. I will investigate some options and update if I find a solution with the newer drivers.

Nested XREFs and layer states

If you use a system of drawing sheet and drawing model in your practice where both are seperate files and the sheets are like a piece of paper with the drawing information pulled into it then this is something you might have come across already, if not then this might help you in the future if you encounter it.

So generally you will attach one or two external drawings to a sheet file and then adjust layers to suit in the sheet file. However occaisonally you will set up a drawing with an XREF, usually an overlay type of drawing (not to be confused with overlay type of XREF) where you have a base drawing and the layers are adjusted to be simplistic and then further information is drawn over the top, e.g. a fire drawing or drainage drawing.


This is where it gets complicated. There is now a chain of drawings. Drawing A (the base drawing) –> Drawing B (the overlay type of drawing) –> Drawing C (the plot drawing). [Note: the arrows indicate XREF attachements]. This chain of XREFs is called nesting.

The problem comes when you want Drawing C to look the same as drawing B does. When you attach Drawing B to C all the layers on drawing A change to when they were first attached to drawing B, all the changes in drawing B seem to be lost. But when you go back to drawing B it still looks as it should. Confused?

The problem is AutoCAD pulls in XREFs (external references) from their source files and not through the nesting. So any information for drawing A setup in drawing B will not be imported into C as drawing C as the information is directly pulled from drawing A.


In order to circumvent this annoying behaviour layer states export and load should be used. Or you just reset them up if its only a few changes, but if lots of colour changes and layer adjustments have been made then this is the method for you.

This is taken from this page: (Copyright AutoDesk).

To export layer settings

  1. At the command prompt, enter LAYER.
  2. In the Layer Properties Manager, click Layer States Manager.
  3. In the Layer States Manager, create a new layer state or select an existing one. Click Export.
  4. In the Export Layer State dialog box, enter a file name and specify a location for the file.
  5. Click Save.
  6. Click OK to close each dialog box.

To restore layer settings

  1. At the command prompt, enter Layer on the command line.
  2. In the Layer Properties Manager, click Layer States Manager.
  3. In the Layer States Manager, select a named layer state.
  4. Select the settings that you want to restore.
  5. Click Restore.
  6. Click OK

Now you should have the correct layer information in drawing C!