gazzalp Posted January 16, 2009 Posted January 16, 2009 Guys, i have a custom toolbar with macros to do a PDF with all our settings, its just written in the command line of the macro (no lisp file etc) and i was wondering if i can add to it a code that will turn off a layer called "Revision in progress" which is part of an xref. This is the code to do the pdf: ^C^C-LAYER;SET;0;;-COLOR;BYLAYER;-LWEIGHT;BYLAYER;LWDISPLAY;OFF;-LINETYPE;SET;BYLAYER;;-STYLE;AWT;ROMANS.SHX;0;0.650;0;N;N;N;-DIMSTYLE;RESTORE;AWT;DIMSCALE;100;-plot;yes;;AWT PDF.PC3;A1;MILLIMETERS;LANDSCAPE;NO;EXTENTS;1:1;CENTER;YES;AWT-HALF.CTB;YES;NO;NO;NO;NO;NO;YES;ZOOM;EXTENTS;QSAVE;CLOSE; Does anyone know how to get it to turn off a certain layer on an xref? thanks for any help Quote
CarlB Posted January 16, 2009 Posted January 16, 2009 how about the following: -layer;off;"*Revision in progress";; I believe the quotes will prevent the spaces in the layer names to act as "enters" Quote
gazzalp Posted January 17, 2009 Author Posted January 17, 2009 Ive tried that, and it does turn the layer off, but then it says select output device. it seems as though maybe ive put it in the wrong location because the rest of the code now wont work ie: the actual PDF creation. Does it matter where i put it? this is the code i had: ^C^C-LAYER;SET;0;;-layer;off;"*Revision in progress";;-COLOR;BYLAYER;-LWEIGHT;BYLAYER;LWDISPLAY;OFF;-LINETYPE;SET;BYLAYER;;-STYLE;AWT;ROMANS.SHX;0;0.650;0;N;N;N;-DIMSTYLE;RESTORE;AWT;DIMSCALE;100;-plot;yes;;AWT PDF.PC3;A1;MILLIMETERS;LANDSCAPE;NO;EXTENTS;1:1;CENTER;YES;AWT-HALF.CTB;YES;NO;NO;NO;NO;NO;YES;ZOOM;EXTENTS;QSAVE;CLOSE; Quote
Lee Mac Posted January 17, 2009 Posted January 17, 2009 Try this: ^C^C-LAYER;SET;0;OFF;"*Revision in progress";;-COLOR;BYLAYER;-LWEIGHT;BYLAYER;LWDISPLAY;OFF;-LINETYPE;SET;BYLAYER;;-STYLE;AWT;ROMANS.SHX;0;0.650;0;N;N;N;-DIMSTYLE;RESTORE;AWT;DIMSCALE;100;-plot;yes;;AWT PDF.PC3;A1;MILLIMETERS;LANDSCAPE;NO;EXTENTS;1:1;CENTER;YES;AWT-HALF.CTB;YES;NO;NO;NO;NO;NO;YES;ZOOM;EXTENTS;QSAVE;CLOSE; Quote
gazzalp Posted January 17, 2009 Author Posted January 17, 2009 It looks like ive stuffed something up, both codes turn off the layer but autocad is now asking for output device name, and all the macros on that toolbar dont have the icons visible. Looks like ill have to work it out on monday when i get to work. thanks for your help Quote
gazzalp Posted January 18, 2009 Author Posted January 18, 2009 OK, ive tried your code Lee and it works fine. Thanks and thanks also CarlB Quote
Lee Mac Posted January 18, 2009 Posted January 18, 2009 I'm not sure why your other code didn't work, - but I just incorporated the "-layer" "off" into the other -layer call so that -layer did not need to be called twice. Obviously did the job! Quote
gazzalp Posted January 19, 2009 Author Posted January 19, 2009 I'm not sure why it didn't work either, but all is sorted now. Thanks Lee Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.