XREF Layer Colors

Discussion in 'AutoCAD' started by jonesr, Aug 2, 2004.

  1. jonesr

    jonesr Guest

    Does anyone have a routine to allows one to select an object in an xref and
    then enter a new color for that object's layer? This would automate using
    the Express nested object list to obtain the name of the layer, running the
    layer command and manually changing the layer. Most useful if you have a few
    xref layers to change but hundreds of xref layers in the dwg.
     
    jonesr, Aug 2, 2004
    #1
  2. jonesr

    R.K. McSwain Guest

    Yes, we have this. It's one of the 600+ tools in ToolPac.
    [Layer | Properties]
     
    R.K. McSwain, Aug 2, 2004
    #2
  3. jonesr

    Josh C Guest

    No error checking...may require regen to see changes on certain objects

    (defun c:xlc ( / obj layer color)
    (while (setq obj (nentsel "\nSelect entity on layer: "))
    (setq layer (entget
    (tblobjname "layer" (cdr (assoc 8 (entget (car obj)))))
    )
    color (acad_colordlg (cdr (assoc 62 layer)))
    )
    (if color
    (entmod (subst (cons 62 color) (assoc 62 layer) layer))
    )
    )
    (princ)
    )
     
    Josh C, Aug 2, 2004
    #3
  4. jonesr

    jonesr Guest

    Works lika champ! Many thanks.

     
    jonesr, Aug 2, 2004
    #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.