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

Changing XREF layer colors in a tool

10 REPLIES 10
Reply
Message 1 of 11
Mr.Hella
1163 Views, 10 Replies

Changing XREF layer colors in a tool

Does anyone in the group know how to edit the string below so that it will ignore all layer names starting with "E-". I want to change all XREFED layers in the current dwg. to 161 but ignore all XREFED layer names that start with E- such as E-lighting, E-power etc.

 

Thanks in advance

 

M.

 

^C^C-layer;c;161;*|*;

10 REPLIES 10
Message 2 of 11
hmsilva
in reply to: Mr.Hella

mhlr,

try

 

^C^C-layer;c;161;*|[~e-]*;;

 

Henrique

EESignature

Message 3 of 11
Mr.Hella
in reply to: hmsilva

Henrique,

 

THANK YOU VERY MUCH!! this is perfect. Forgive me! I have very little knowledge of Lisp as you could imagine since I've posted these questions! in your opinion, what would be the best way to learn how to do this on my own??

 

Thanks again,

 

M.

Message 4 of 11
hmsilva
in reply to: Mr.Hella

mhlr,
try the Acad Customization Guide
under DIESEL,
or just google "acad diesel tutorial"

 

for  Lisp see the Acad Customization Guide,

and see google "afralisp"

 

Cheers

Henrique

EESignature

Message 5 of 11
pbejse
in reply to: Mr.Hella

Also consider looking up wcmatch function for wild-card pattern match. ..e.g. *|[~e-]* 

 

HTH

 

 

 

Message 6 of 11
erod714
in reply to: Mr.Hella

Is it possible to get a pop up to select my own color instead of a color designated?

Message 7 of 11
ronjonp
in reply to: erod714


@erod714 wrote:

Is it possible to get a pop up to select my own color instead of a color designated?


Try this: (acad_colordlg 1)

Message 8 of 11
erod714
in reply to: ronjonp

Thanks it worked!
Message 9 of 11
ronjonp
in reply to: erod714

Glad to help.
Message 10 of 11
erod714
in reply to: ronjonp

Do you have a command line series for changing a selected xref's layer color and linetype?  I'm trying to change the color and linetype of an xref layer only.  (Ex. I only want to change the xref existing water color and linetype by selecting the line) I know it can be done with through the layer properties, but I'm trying to make a customized button.

Message 11 of 11
ronjonp
in reply to: erod714

HERE is a recent post that will change a layer color by pick. Perhaps you can modify it to apply a linetype too?

If these layer names have something in common like *DEMO*, you could use the -layer command and apply a color and linetype based on a wildcard match with no picking necessary.

Command: -LAYER
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile/Xref]: c
New color [Truecolor/COlorbook] : 1
Enter name list of layer(s) for color 1 (red) <0>: *demo*
Enter an option [?/Make/Set/New/Rename/ON/OFF/Color/Ltype/LWeight/TRansparency/MATerial/Plot/Freeze/Thaw/LOck/Unlock/stAte/Description/rEconcile/Xref]:

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

Post to forums  

Autodesk Design & Make Report

”Boost