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

Lisp file to plot all layers ON,

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
JamaL9722060
1374 Views, 9 Replies

Lisp file to plot all layers ON,

Lisp file to plot all layers on,

 

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

 

Clip_312.jpg

 

Thank you

 

Best

 

Jamal

---------------------------
Jamal Numan
9 REPLIES 9
Message 2 of 10
pbejse
in reply to: JamaL9722060


@JamaL9722060 wrote:

Lisp file to plot all layers on,

 

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

 

Jamal


@JamaL9722060 wrote:

 

Moving objects in AutoCAD is risky!

 

It happens very frequently that I move particular drawing when other objects are:

 

  1. Turned off
  2. Frozen
  3. Locked
  4. Annotative visibility is off

 

Jamal



If my understanding is correct. Both will require a "command reactor" ,

 

One for MOVE and another for PLOT. 

 

 

Message 3 of 10
JamaL9722060
in reply to: pbejse

Thanks pbejse.

 

I’m wondering how such very basic commands are not built in the AutoCAD!

 

Best

 

Jamal

 

---------------------------
Jamal Numan
Message 4 of 10
pbejse
in reply to: JamaL9722060


@JamaL9722060 wrote:

Thanks pbejse.

 

I’m wondering how such very basic commands are not built in the AutoCAD!

 

Best

 

Jamal

 


We can write a routine for "one click" 

 

but my question is, are you wanting to do this only with the PLOT command? 

 

Message 5 of 10
Kent1Cooper
in reply to: JamaL9722060


@JamaL9722060 wrote:

Lisp file to plot all layers on,

 

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

....


Again, the (command) function is your friend.  Incorporate something like this:

 

(command "_.layer" "_plot" "_plot" "*" "")

 

or include the Plot option among other options in a longer Layer command.

 

In this case, I would suggest not redefining the Plot command, because again, Layers are set to not Plot for a reason, so you wouldn't want to accidentally Plot with those all showing up when you didn't mean to, which would happen if you redefine it or make a reactor to trigger it.  But you could still do it that way, and use .PLOT when you want to preserve the non-plotting nature of Layers set that way.

 

But I think it would be better to define your own command, named something like PlotAll.

Kent Cooper, AIA
Message 6 of 10
JamaL9722060
in reply to: Kent1Cooper

Thank you very much for the help. This is really very useful.

 

How about a lisp file that allowing selecting the layers that not to be plotted.

 

All what I mean is to have sufficient tools to manage my layers outside the “layer properties manager”!

 

Clip_331.jpg

 

Best

 

Jamal

---------------------------
Jamal Numan
Message 7 of 10
Kent1Cooper
in reply to: JamaL9722060


@JamaL9722060 wrote:

.... 

How about a lisp file that allowing selecting the layers that not to be plotted.

 

All what I mean is to have sufficient tools to manage my layers outside the “layer properties manager”!

....


I'm not sure what you mean by that.  As far as I know, you can't "select" Layers except in the Layer Properties Manager [unless you mean you want to select all objects drawn on those Layers, but that doesn't seem likely].  Do you want some kind of list of all Layers that are set to not plot?  If you want it for purposes of setting them not to Plot again afterwards, consider the Layerp command instead.

Kent Cooper, AIA
Message 8 of 10
JamaL9722060
in reply to: Kent1Cooper

Sorry for the confusion,

 

Each command on the layer panel has two options ON/Off. I wanted the Plot to join that family and to have these options such that one can select (object selection or window section) the layer that is not required to be plotted. For example, from that panel, one can choose the layer to lock/unlock. Why not to have same commands that enable one to choose the layer to plot/unplot?

 

Clip_337.jpg

 

In the winder image, I’m still wondering why these commands are not plugged on that panel! It is much easier to access these commands than the “layer properties manager”.

 

Best

 

Jamal

---------------------------
Jamal Numan
Message 9 of 10
pbejse
in reply to: JamaL9722060


@JamaL9722060 wrote:

Sorry for the confusion,

 

Each command on the layer panel has two options ON/Off. I wanted the Plot to join that family and to have these options such that one can select (object selection or window section) the layer that is not required to be plotted. 

Best

 

Jamal


(defun c:nplot (/ s llist Layers l e)
  (vl-load-com)
  (setq llist  nil
        Layers (vla-get-layers (vla-get-ActiveDocument (vlax-get-acad-object)))
  )
  (prompt "\rSelect object to include in NO PLOT status")
  (if (setq ss (ssget))
    (progn (repeat (setq i (sslength ss))
             (if (not (member (setq l (cdr (assoc 8 (entget (setq e (ssname ss (setq i (1- i)))))))) llist)
                 )
               (progn (Setq llist (cons l llist)) (vla-put-Plottable (vla-item layers l) :Vlax-false))
             )
           )
           (princ "\nLayers include in NO PLOT status")
           (foreach itm llist (princ (strcat "\n\t" itm)))
           (sssetfirst
             nil
             (ssget "_X"
                    (list (cons 8 (apply 'strcat (mapcar (function (lambda (n) (strcat n ","))) llist))))
             )
           )
    )
  )
  (princ)
)

 

We can write a routine where you can select the layers on a listbox if thats what you need.

 

HTH

 

Message 10 of 10
JamaL9722060
in reply to: pbejse

Many thanks pbejse for the time and effort. It works fine.

 

Clip_349.jpg

 

 

What is interesting in this command that you have already developed is the “window section”! for example, the Lock/Unlock commands doesn’t allow windows section which is very annoying.

 

Best

 

Jamal

---------------------------
Jamal Numan

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

Post to forums  

Autodesk Design & Make Report

”Boost