Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CHANGE COLOR LAYER IN XREF

12 REPLIES 12
Reply
Message 1 of 13
tdcad
756 Views, 12 Replies

CHANGE COLOR LAYER IN XREF

Hi all,
I don't know much about lisp but can any one please help me come up with good lisp routine that will change all different color of layers from Xref to another color I want!

Thanks so much
12 REPLIES 12
Message 2 of 13
Anonymous
in reply to: tdcad

Hi tdcad,
look at attach file.

wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 3 of 13
Anonymous
in reply to: tdcad

or with this

Works lika champ! Many thanks.

"Josh C" wrote in message
news:410e5f5e$1_2@newsprd01...
> 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)
> )
>
>
> "jonesr" wrote in message
> news:410e3516_2@newsprd01...
> > 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.
> >
> >
>
>




wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 4 of 13
tdcad
in reply to: tdcad

How about global. Meaning all layer color will change in one color.

Thanks
Message 5 of 13
Anonymous
in reply to: tdcad

thanks for this wonderfull little routine.
I used to work at a place that had xe.lsp and I could change color,
linetype, off, frozen, in a dialog box.

so.....how about changing the entity linetype in xref?
--
BIGGEORGE

Where are we going and
what am I doing in this handbasket?

"Adesu" wrote in message
news:5439509@discussion.autodesk.com...
or with this

Works lika champ! Many thanks.

"Josh C" wrote in message
news:410e5f5e$1_2@newsprd01...
> 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)
> )
>
>
> "jonesr" wrote in message
> news:410e3516_2@newsprd01...
> > 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.
> >
> >
>
>




wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 6 of 13
Anonymous
in reply to: tdcad

I have posted one before. If you search I'm sure you will find many
routines that will suit your needs.

--

Tim
"A blind man lets nothing block his vision."


wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 7 of 13
Anonymous
in reply to: tdcad

check out cadthinking.com for a free tool "ChLayCoLt"
It is much better than most simple tools because it has a "deeper" and "shallower" tool to step through nesting levels
for stuff in blocks or xrefs.
It is one of my handiest tools by far because it acts as both an info tool and a layer changer tool.
see attached image for dialog screenshot.
I have for 2007 also if anyone wants.

tdcad <>
|>Hi all,
|>I don't know much about lisp but can any one please help me come up with good lisp routine that will change all different color of layers from Xref to another color I want!
|>
|>Thanks so much
James Maeding
Civil Engineer and Programmer
jmaeding - athunsaker - com
Message 8 of 13
tdcad
in reply to: tdcad

Pleas! may i have it.

Thanks
Message 9 of 13
Anonymous
in reply to: tdcad

You are welcome.
for "how about changing the entity linetype in xref" I would test it.

"BIGGEORGE" wrote in message
news:5439806@discussion.autodesk.com...
thanks for this wonderfull little routine.
I used to work at a place that had xe.lsp and I could change color,
linetype, off, frozen, in a dialog box.

so.....how about changing the entity linetype in xref?
--
BIGGEORGE

Where are we going and
what am I doing in this handbasket?

"Adesu" wrote in message
news:5439509@discussion.autodesk.com...
or with this

Works lika champ! Many thanks.

"Josh C" wrote in message
news:410e5f5e$1_2@newsprd01...
> 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)
> )
>
>
> "jonesr" wrote in message
> news:410e3516_2@newsprd01...
> > 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.
> >
> >
>
>




wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 10 of 13
Anonymous
in reply to: tdcad

Hi
Here as you want that code
[code]
(defun c:test (/ col lay obj opt sse sse_ton ssn ton)
(while
(null (setq obj (nentsel "\nSelect entity of Xref object: ")))
(princ "\nNO XREF OBJECT ENTITIES FOUND!") ; print
message if
(princ)
) ; while
(setq ssn (car obj))
(setq sse (entget ssn))
(setq lay (cdr (assoc 8 sse)))
(setq ton (tblobjname "layer" lay))
(setq sse_ton (entget ton))
(setq ltyp (cdr (assoc 6 sse_ton)))

(setq opt (getstring "\nEnter new linetype model: "))
(if (= opt "")(setq opt "dashed"))
(if
opt
(entmod (subst (cons 6 opt)(assoc 6 sse_ton) sse_ton))
) ; if
(princ)
)
[/code]

"Adesu" wrote in message
news:5441927@discussion.autodesk.com...
You are welcome.
for "how about changing the entity linetype in xref" I would test it.

"BIGGEORGE" wrote in message
news:5439806@discussion.autodesk.com...
thanks for this wonderfull little routine.
I used to work at a place that had xe.lsp and I could change color,
linetype, off, frozen, in a dialog box.

so.....how about changing the entity linetype in xref?
--
BIGGEORGE

Where are we going and
what am I doing in this handbasket?

"Adesu" wrote in message
news:5439509@discussion.autodesk.com...
or with this

Works lika champ! Many thanks.

"Josh C" wrote in message
news:410e5f5e$1_2@newsprd01...
> 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)
> )
>
>
> "jonesr" wrote in message
> news:410e3516_2@newsprd01...
> > 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.
> >
> >
>
>




wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 11 of 13
Anonymous
in reply to: tdcad

Adesu,

I have a problem!
It is with your English and your code!

First of all your code ...well it is rubbish!
Next it is your English near perfect until it is scrambled!

E.G

>>Works lika champ! Many thanks.

This is not from a person that does not have a command of
the language!

Regards Gary
www.drcauto.com

"Adesu" wrote in message
news:5439509@discussion.autodesk.com...
or with this

Works lika champ! Many thanks.

"Josh C" wrote in message
news:410e5f5e$1_2@newsprd01...
> 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)
> )
>
>
> "jonesr" wrote in message
> news:410e3516_2@newsprd01...
> > 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.
> >
> >
>
>




wrote in message news:5439495@discussion.autodesk.com...
Hi all,
I don't know much about lisp but can any one please help me come up with
good lisp routine that will change all different color of layers from Xref
to another color I want!

Thanks so much
Message 12 of 13
brendan35
in reply to: tdcad

I was using chlaycolt in 2005, but had to upgrade to 2007. you mentioned you had a version for 2007, if possible i would like to get a copy.

Brendan
Message 13 of 13
Anonymous
in reply to: tdcad

I love this tool as well and use it everyday!
I only wish it had the ability to change layer linetypes and lineweights

kd

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost