Jump to content

Recommended Posts

Posted

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

Posted

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"

Posted

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;

Posted

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;

Posted

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

Posted

OK, ive tried your code Lee and it works fine. Thanks and thanks also CarlB

Posted

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! :)

Posted

I'm not sure why it didn't work either, but all is sorted now. Thanks Lee

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...