Jump to content

Recommended Posts

Posted

Is there a way to modify publish to freeze a specific layer in all drawings that it will publish before it publishes them? Im just learning lisp and have no idea where to start. any help would be great

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

  • The Buzzard

    17

  • chelsea1307

    8

  • Lee Mac

    6

  • Commandobill

    1

Top Posters In This Topic

Posted

Hi chelsea1307,

 

You can shut off a specific layer with lisp, But I do not believe you can modify an AutoCAD command to do it. Below is a simple lisp to freeze a specific layer called MYLAYER. This is just to get you started. I am sure others will add their input as well to help you further.

 

The MYLAYER part of this lisp is the layer name . You may use what you wish.

Note: Start small and work up to larger coding.

 

Good luck with your coding

 

(defun C:LF ()                             ;Define function
 (command "_.layer" "F" "MYLAYER" "")     ;Start layer command, Freeze MYLAYER
)                                          ;End define function

Posted

maybe it can be done without using publish, I know ive found batch plot lisps so maybe a combination of of one of those with the freeze layer will work. Im not exactly how the batch plot ones work though so maybe not

Posted

Try this:

 

 

(defun C:LF ()                             ;Define function
 (command "_.layer" "F" "MYLAYER" "")     ;Start layer command, Freeze MYLAYER
 (command "_.save" "")                    ;Save drawing
 (command "_.publish" "")                 ;Start publish command
)                                          ;End define function

Posted

It's not exactly pretty but it will get you started

 

(defun c:bip ( / )
 (command "-layer" "F" "MYLAYER" "")
 (setq laylst (layoutlist))
 (while (/= laylst nil)
   (setvar "ctab" (car laylst))
   (command "-plot" "yes" "" "PLOTTER NAME" "11\" x 17\"" "inches" "landscape" "no" "extents" "fit" "center" "yes" "monochrome.ctb" "yes" "no" "no" "no" "no" "no" "yes") ; YOU SHOULD REALLY TEST THIS WITH YOUR PRINT SETTINGS
   (setq laylst (cdr (laylst)))
   )
 (command "-layer" "T" "MYLAYER" "")  

 )

 

Now ill just sit back and wait for Lee. lol

Posted
Now ill just sit back and wait for Lee. lol

 

haha.. no, you can have this one - not my kind of LISP (I hating anything to do with print jobs...)

 

Lee

Posted
haha.. no, you can have this one - not my kind of LISP (I hating anything to do with print jobs...)

 

 

So I guess were not off the hook?

Posted
So I guess were not off the hook?

 

Are you implying I may be writing one anyway...? Nah, not this one. 8)

Posted

Shirley your joking with us.:shock:

 

And I am sorry for calling you Shirley.:lol:

Posted

Not this time Angela (now we're even :P )...

 

Hey! At least it latin.:roll:

 

I will have to do my best then if I can find it.:unsure:

Posted
Hey! At least it latin.:roll:

 

hehe, I'm just messin with ya o:)

Posted

Commandobill or buzzard(aka angela) or lee mac or anyone else reading this would it be possible to change the print settings in the lisp commandobill posted to a specific pagesetup with the print info in it? I can make it something random or super specific so the same name wont be used again

Posted

What! The Angela thing or are you taking over here.:?

Posted
What! The Angela thing or are you taking over here.:?

 

Angela thing mate :P

Posted

Commandobill would it be possible to change the print settings to a specific pagesetup with the print info in it? I can make it something random or super specific so the same name wont be used again

 

Commandobill!

 

You got the tag.

Posted

do you feel included now buzzard

Posted

Just for your information I have a new name.

 

Angela:lol::lol::lol:

 

I will answer what I can for you.o:)

Posted

I just used Commandobills program to plot a PDF. It works well as long as you

answer all the prompts, However if I accept the default on some by just clicking enter, It does not go to plot. I think if your information is hard coded in the program to answer the defaults I believe it will be OK.

 

I would prefer Commandobill to answer this as I am not sure since this is not my program. I do believe he could give you a better answer.

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...