Overlay/Attach X-Refs

Discussion in 'AutoCAD' started by Vladimir Burce, Feb 26, 2005.

  1. Can anyone share a lisp routine where I can either overlay or attach an
    external reference defaulting at insertion point 0,0,0, and at the same time
    create a layer name specified to that x-ref's drawing name? e.g. the x-ref
    name is BASE.DWG, as a result, the layer name will be X-BASE.

    Any suggestions?

    Thanks,

    -vlad
     
    Vladimir Burce, Feb 26, 2005
    #1
  2. (defun C:XA ()
    (setq FN (getstring "\nInput XREF file name ? "))
    (if (findfile (strcat FN ".dwg"))
    (progn
    (command "LAYER" "M" (strcat "X-" FN) "")
    (command "XREF" "A" FN "0,0" "1" "1" "0")
    )
    (princ (strcat "\nXREF File " FN " NOT found."))
    )
    (princ)
    )
     
    Alan Henderson @ A'cad Solutions, Feb 26, 2005
    #2
  3. I am wondering if there is a way to have a browse feature rather than a user
    direct input (type) the wanted xreferenced file?



    Example:

    I want to be able to assign my xref'ed drawing file to there own layers upon
    xrefing.



    Layer name something like: (G-Xref-"drawing file name")



    Each discipline in their own folder: (and we use relative pathing for xref'
    ing)

    Project Directory:

    Architectural - Architectural files are located within this folder

    Mechanical - Mechanical files are located within this folder

    Electrical - Electrical files are located within this folder

    Etc.



    Am I making any since at all?
     
    Michael Sonnier, Mar 3, 2005
    #3
  4. use vl-directory-files for user interface

     
    Alan Henderson @ A'cad Solutions, Mar 4, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.