05-lecture-working with external references

Upload: jayzieziezie

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 05-LECTURE-Working With External References

    1/16

    WORKING WITH EXTERNAL

    REFERENCES (XREFS)

    Definition

    An external reference is a pointer that resides in a drawing (see Figure 1). The pointerreferences another drawing that is external to the parent drawing. A referenced drawing isvisible within the parent drawing.

    Figure 1. An XREF is a pointer

    Concepts

    External references (XREFs) are useful in an environment where a team of drafters isworking on a project, with each person constructing individual components of theproject. Each team member can view drawings belonging to others, so that changesare handled and drawings stay synchronized.

    To create an XREF, you attach a referenced drawing to a parent drawing. An attachedXREF appears as a single entity on the current layer in the parent drawing, similar toan inserted block.

    Referencing a drawing is different from inserting a drawing. Inserting a drawing takesa snapshot of a drawing in its current state. The snapshot is not updated if the inserteddrawing changes.

    On the other hand, when you open a drawing that contains an XREF, you see themost recently saved version of the referenced drawing.

    A drawing can contain multiple XREFs (see Figure 2).

    A drawing can reference another drawing, which may reference yet other drawings,which may result in nestedXREFs. A nested XREF is one that is attached to a parentdrawing through another drawing (see Figure 2).

    A drawing can be both a parent and an XREF (see Figure 2).

    Two drawings can reference each other, resulting in a circular reference (see Figure 3).

  • 8/3/2019 05-LECTURE-Working With External References

    2/16

  • 8/3/2019 05-LECTURE-Working With External References

    3/16

    There is a set of operations you can perform on an XREF:

    You can open an XREF drawing to edit it from within the parent drawing.

    You can unload an XREF to remove it from your display.

    You can reload an XREF to force AutoCAD to re-read the XREF drawing file.

    You can detach an XREF drawing from the parent.

    You can bind certain objects or an entire XREF drawing into a parent.

    Objects you can bind are called named dependent objects.

    You can change settings of referenced layers from within the parent drawing. Layersettings affect only the parent drawing and do not affect layer settings in thereferenced drawing.

    You can clip unneeded portions of XREF drawings, saving system resources, thussaving time.

    The Reference Toolbar

    Figure 4. Reference Toolbar

    Inserting an XREF

    The XATTACH command provides one way to specify a drawing file to be referencedinto the current drawing as an XREF.

    Command line: XATTACH

    Pulldown: Insert DWG Reference

    Reference Toolbar: (see Figure 4)

    When you invoke XATTACH,the Select Reference File dialogbox appears (see Figure 5),where you can navigate to andselect the drawing you want toreference.

    Figure 5. Reference Toolbar

    Xref Xattach Xclip Xbind Xclipframe

  • 8/3/2019 05-LECTURE-Working With External References

    4/16

    When you have selected a file, theExternal Reference dialog boxappears (see Figure 6), where youcan specify the reference type,insertion point, scale factors, and

    rotation angle. Check theappropriate boxes if you wish tospecify any of these items onscreen instead of here in thedialog box.

    Figure 6. External Reference dialog box

    The Squares drawing appears in the Circles drawing (see Figure 7).

    Figure 7. External Reference dialog box

    Selecting anysquare

    selects theentire XREF.

    Circles is theparent;

    Squares is theXREF.

    Squares.dwgis attached toCircles.dwg.

  • 8/3/2019 05-LECTURE-Working With External References

    5/16

    Reference Type

    The reference type determines whether XREFs are nested.

    The reference type can be attachmentor overlay.

    A referenced drawing that is an attachment is visible in the parent of its parentdrawing. It is called a nested XREF (see Figure 8).

    A referenced drawing that is an overlay is not visible in the parent of its parentdrawing (see Figure 8).

    Figure 8. Attachment vs. Overlay

    The default reference type is Attachment.

    Overlays are recommended to prevent unduly complicated XREF configurations.

    If all Reference types are Attachments, then all XREF drawings are visible in alldrawings all the way up the chain.

    Drafters further up the chain may be unnecessarily loading and viewing XREFs thatthey dont need.

    Using Overlays breaks the chaining created by attachment XREFs.

    Using overlays means all drafters must choose which drawings to XREF into theirdrawing.

    Dependent Objects

    A dependent object is a named non-graphical entity that is defined within areferenced drawing.

    Dependent objects are block definitions, dimension styles, layers, linetypes, and text

    styles. An XREFs dependent objects are visible within the parent drawing.

    To avoid name conflicts, dependent objects assume a different name in a parentdrawing.

    When an XREF is attached, its dependent objects are denoted by the XREF drawingname and a vertical bar (|) followed by the object name.

  • 8/3/2019 05-LECTURE-Working With External References

    6/16

    For example, in a parent drawings layer table, you might see a layer namedFoundation Details|Beams.

    You cannot access, rename, or delete dependent objects from the parent drawing.

    You can, however, bind an entire referenced drawing, including its named dependentobjects, or you can bind individual dependent objects.

    XREF Layers

    When you attach an XREF to a parent drawing, the parent drawing receives a copy ofthe layer table from the XREF drawing.

    The special naming for dependent objects separates XREF layers from layers in theparent drawing (see Figure 9).

    Figure 9. XREF layers are kept separate from parent layers

    Changes you make affecting XREF-dependent layer settings can be saved ordiscarded when you save the parent drawing.

    The XREF layer settings you can change are On/Off, Freeze/Thaw, Color, andLinetype.

    If you wish, these changes to layer settings can be saved in the parent drawing.

    The referenced drawing is unaffected by changes to layer settings made in the parentdrawing.

    Parent layersParent layers XREF layersXREF layers

    Example

    Suppose an XREF drawing contains 200 layers.

    Suppose you freeze 100 of them in the parent drawing, thensave and close the parent drawing.

    When you re-open the parent drawing, should those 100 layersstill be frozen?

  • 8/3/2019 05-LECTURE-Working With External References

    7/16

    The answer depends on the setting of a system variable named VISRETAIN.

    You can modify this setting in two ways:

    o On the Open and Save tab of the Options dialog, check the box labeledRetainchanges to Xref layers to save changes, or uncheck this item to discard changes.

    o Type VISRETAIN at the Command prompt and enter a new value.

    0 Changes made are discarded when the parent drawing is closed.

    1 (default) Changes made are retained when the parent drawing is saved andpersist from session to session.

    The External References Palette

    The External References palette (see Figure 10) lists all XREF drawings and displaystheir status and other information.

    Command line: XREF or EXTERNALREFERENCES

    Pulldown: Insert External References

    Reference Toolbar: (see Figure 4)

    Figure 10. The External References palette

    The ExternalReferences

    alette

    XREFs Status Referencetype

    Details fora selected

    XREF

  • 8/3/2019 05-LECTURE-Working With External References

    8/16

    As shown in Figure 11, youcan right-click on an XREFin the list to display a list ofoptions.

    Figure 11. XREF options menu

    Open Opens the XREF drawing for editing in your current AutoCAD session.

    Attach Displays theExternal Reference dialog box.

    Unload Maintains the link to the referenced drawing, but removes it from thedisplay to reduce clutter and regeneration time. Reload the drawing tomake it re-appear.

    Reload Re-reads a referenced drawing file.

    Detach Breaks the link between the parent drawing and the referenceddrawing. The detached drawing immediately disappears from thedisplay.

    Bind Equivalent to Insert followed by Detach. Only for XREFs that are notnested. Bind breaks the link between the referenced drawing and the parentdrawing, and converts the referenced drawing to a block in the parentdrawing, on the layer that was current when the drawing was referenced.You would bind an XREF only when the XREF drawing is completelyfinished (and maybe not even then). Displays theBind Xrefsdialog box (seeFigure 12), where you specify handling for dependent objects.

    Figure 12. Bind Xrefs dialog box

    Right-click onan XREF todisplay an

    o tions menu.

    Separates nameddependent objects

    Combines nameddependent objects

  • 8/3/2019 05-LECTURE-Working With External References

    9/16

    Dependent objects are block definitions, dimension styles, layers,linetypes, and text styles. When you bind an XREF, you must specifyhow to resolve potential conflicts between dependent objects that havethe same name in both drawings, but different settings.

    The Bind option keeps dependent objects separate. It retains the

    prefix, and the vertical bar (|) is replaced by $n$, where n is a digitfrom 0 9.

    The Insert option merges dependent objects that have the samename. It drops the prefix. Dependent objects with the same namein both drawings assume the characteristics of the parent drawing.(See Binding Objects below.)

    The Details panel

    The Details Panel in the External References palette displays information about a selectedXREF (see Figure 13).

    Reference Name The name assigned to the XREF when it was attached. This is usually thefilename without the extension.

    Status The current status of the XREF (see Table 1 below.)

    Type Displays the reference type. To change to a different reference type, clickon the Type setting, then click on the down arrow and select the oppositetype. You cannot change the reference type of a nested XREF.

    Found At Displays the pathname where a selected XREF was last loaded from.

    Saved Path Updates the pathname where the referenced drawing is located.

    Figure 13. The Details panel

    List View/Tree View

    By default, XREFs are shown in list view in theExternal References palette. You candisplay XREFs hierarchically by switching to Tree View. Switch between List View andTree View by clicking on one of the two buttons in the upper left corner of theExternalReferences palette. Tree View shows whether any XREFs are nested within other XREFsin the parent drawing (see Figure 14).

  • 8/3/2019 05-LECTURE-Working With External References

    10/16

    Figure 14. The External References palette in Tree View

    In List View, the Status column in the External References palette displays the currentstatus of each XREF in the current drawing. Possible values for the status are shown inTable 1 below.

    Table 1. Xref Status Meanings

    Status Meaning

    Loaded AutoCAD located the XREF.

    Not Found AutoCAD was unable to locate a previously-defined XREF when the parent

    Unloaded The XREF is currently unloaded.

    Unresolved The XREF was found but could not be read by AutoCAD.

    UnreferencedA nested XREF is attached to an XREF that is no longer attached (the path to itsparent XREF may have been changed to reference a different file).

    Orphaned A nested XREF is attached to an XREF that has been unloaded.

    Opened The parent drawing.

    Needs reloading Follows notification that an XREF has been modified and needs to be reloaded.

    Notification of Changes to an XREF Drawing (R2004)

    If an XREF drawing is changed while you are editing a parent drawing, the notificationwindow shown in Figure 15 below appears in the lower right corner of your screen tonotify you that the XREF drawing may need to be reloaded.

    Tree view

    List view

    NestedXREF

  • 8/3/2019 05-LECTURE-Working With External References

    11/16

    Figure 15. Notification of Change in Xref Drawing

    Click on the XREF name in the notification window. AutoCAD reloads the XREF.

    LOCATING UNRESOLVED XREFs

    If AutoCAD cannot locate an XREF drawing when you open the parent drawing, theXREF drawing is designated as unresolved, and it does not appear in the parent drawing.

    Instead, AutoCAD does two things:

    1. It displays a message in the command window (press F2 to see it):

    Resolve Xref "desks1": \\edg\files\VIPHome\sgideon\desks1.dwg"desks1.dwg" cannot be found.

    2. It displays the pathname where itlooked for the unresolved XREF inthe drawing (see Figure 16).

    Figure 16. Pathname of an unresolved XREF in a parent drawing

    You must locate theXREF drawing andupdate the pathinformation to re-establish the XREF

    link. Invoke the XREFcommand to display theExternal Referencespalette, and click on theXREF in the list. Noticethat the status is Notfound (see Figure 17).

    Figure 17. An unresolved XREF in the External References palette

    In the Details panel, click in the box labeled Found At. Click on the button (see Figure17) to invoke the Select new path dialog box.

  • 8/3/2019 05-LECTURE-Working With External References

    12/16

    When you have located andopened the XREF, the newpathname appears in theExternal Referencespalette.The referenced drawing

    appears in your display, andits status is changed toLoaded (see Figure 18).

    Figure 18. An resolved XREF is loaded automatically

    XBIND

    The XBIND command converts any named dependent object in an XREF drawinginto a permanent part of the parent drawing.

    Essentially, XBIND makes a copy of the named object in the parent drawing.

    Refer to Figures 19 22 for the sequence of steps to bind an object.

    Command line: XBIND

    Pulldown: Modify Object External Reference Bind

    Reference Toolbar: (See Figure 4)

    Figure 19. Xbind dialog box

    Click on the plussign next to anXREF name to

    expand the list ofnamed objects.

  • 8/3/2019 05-LECTURE-Working With External References

    13/16

    Figure 20. List of named dependent objects

    Figure 21. Selecting an object to be bound

    Click on the plussign next to a

    named object tosee a list of items in

    that category.

    Then click on theAdd button.

    Click on the objectyou want to bind.

  • 8/3/2019 05-LECTURE-Working With External References

    14/16

    Figure 22. An object after binding

    When you close the dialog box, bound objects are renamed as discussed earlier: thevertical bar (|) is replaced by the $n$ notation, where n is a number from 0-9.

    You can also open DesignCenter to import named objects from another drawing.

    Binding Objects

    If you invoke XBIND or select theBind option from theBind Xrefsdialog box, dependentobjects assume a new name that includes the referenced drawing name, but the pipe (|)

    symbol is converted to $n$ (where n is a number). When you are binding a referenceddrawing, select this option if there are conflicts between named objects, for example, ifthe parent and referenced drawings contain two layers with the same name but differentcolor or linetype assignments, or two different blocks with the same block name.

    XCLIP

    The XCLIP command lets you visually crop a selected XREF or a block to display only theportion inside a boundary that you define (see Figure 23). The portion of the XREF or blockoutside the boundary does not appear. Clipping saves system resources and improvesperformance.

    Figure 23. Drawing a polygonal clipping boundary

    Bound objectsappear here.

    Click on Removeto unbind.

  • 8/3/2019 05-LECTURE-Working With External References

    15/16

    After clipping, only the part of the XREF within the boundary is visible (see Figure 24).

    Figure 24. A clipped XREF

    Command line: XCLIP

    Pulldown: Modify Clip XrefReference Toolbar:

    When XCLIP prompts you to select an object, select an XREF. You can specify thefollowing options in the XCLIP command:

    New boundary Displays additional prompts from which you determine the shapeof the clipping boundary: an existing polyline, a polygon, or arectangle.

    On Displays only the geometry inside the clipping boundary.

    Off Displays the entire XREF (or block), disregarding the clipping

    boundary.Delete Deletes an existing clipping boundary; turn on the boundary to

    select it.

    Clipdepth Lets you create front and back clipping planes for 3D objects.

    Generate Polyline Draws a polyline on top of an existing clipping boundary.

    When you clip an XREF, the boundary you drew does not appear in the drawing.Youcan force it to appear by turning it on in one of these ways (see Figure 25):

    Click on the External Reference Clip Frame button ( ) in the Reference toolbar.Click it again to turn off a clipping boundary.

    Post the Modify menu and chooseObject

    External Reference

    Frame. Select it againto turn off a clipping boundary,

    Set the value of the XCLIPFRAME system variable to 1 to display the clippingboundary. Set it to 0 to turn off a clipping boundary.

  • 8/3/2019 05-LECTURE-Working With External References

    16/16

    Figure 25. A clipped XREF with the frame turned on

    If you need to see the entire XREF again, simply turn off clipping. Invoke the XCLIPcommand, select the XREF or the boundary, and choose OFF to turn clipping off.