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.

Xref_layerinfoattached

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.

Xref_nestedlayerinfoattached

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!

Grip edits not working

Introduced quite a while back for polylines and a while back for hatch, these allow you to add, edit and stretch existing lines by editing the blue square grips.

Gripedit01

However sometimes on polylines the edit menu for removing does not appear. This is usually due to two overlapping grips being present in the same space.

Gripedit02

To solve this problem, move the grip between the two points that don’t work to reveal the hidden overlapping grips. Now you should be able edit the grips again.

Gripedit03

Missing SHX Fonts

Sometimes AutoCAD pops up a message saying “Missing SHX Files”. SHX files are AutoCAD’s shape and font files. These were used for Fonts before AutoCAD used Truetype fonts. Generally if you e-transmit a file the shape files used are included. However if you just send the raw CAD file then sometimes you will be missing shape files.

After searching around I found that on CAD Tutor that a kind member had posted their collection of LOADS of SHX fonts. Whilst his server is down I have attached the download here and here for future reference!

Skewed World UCS

One of my colleagues had a drawing where the UCS had been rotated to suit a particular part of the drawing, however on setting the UCS back to World the World UCS was also rotated. AutoCAD helpfully shows the cursor as skewed if the UCS icon is not visible or obvious.

RotatedUCS
The UCS icon when rotated
RotatedWorldUCS
The World UCS rotated

This is due to the Plan view not being updated to suit the World UCS and is the exactly the same problem as noted in my UCS World post. Just type PLAN and select World to get back to normal. You can always tell if you are in World view by the UCS icon having a little sqaure on it. Any other view will just show the two axes.

WorldUCS
The World UCS as seen normally

As this is now really an LT problem as the full version of AutoCAD has a nifty rotate view button I have written a couple of scripts to set the UCS to an object and then rotate both the Plan and UCS to suit that object and also a useful one to get back to a World view. These will be published shortly as part of my customising AutoCAD series.

 

Qleaders Always Plotting Though Off

One of my colleagues found that qleader heads (not the lines but just the heads) would plot in a viewport even when turned off. This seems to only affect DWG to PDF plots but might affect other plotters.

The solution to the problem is to freeze off the layer with the qleader on rather than just turning off, this way the object is completely off and won’t show though even if its not supposed to!

Customisation Category

Customising AutoCAD can be quite daunting so I thought I would produce a few posts to run through the process of customisation from creating a new Ribbon tab and ribbon panels from scratch through to adding your own buttons.

Button creation is probably the most important as they can contain scripts to optimise and speed up many tasks.

These posts will be within the Customisation Category.

Blank drawing revisted

In my previous post, I mentioned that you could go back to the more traditional start up in AutoCAD by changing the STARTUP variable to 0. This does not however remove the New Tab if you close all drawings, in order to go to a blank AutoCAD when all drawings are closed, change NEWTABMODE to 0.

Nonewtab