Autocad 2009 routine for LAYUNISO

Autocad 2009 routine for LAYUNISO

eoconnor95662
Enthusiast Enthusiast
921 Views
6 Replies
Message 1 of 7

Autocad 2009 routine for LAYUNISO

eoconnor95662
Enthusiast
Enthusiast

This is my code:


 (defun c:test ()
 (command ".layer" "thaw" "*" "")

(princ)

)

 

It returns NIL. Is there something wrong with that tiny bit of code? It doesn't do anything when used other than return NIL.

 

Feedback appreciated. Thank you!

0 Likes
Accepted solutions (1)
922 Views
6 Replies
Replies (6)
Message 2 of 7

rkmcswain
Mentor
Mentor

It works fine here in 2019

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 7

cadffm
Consultant
Consultant

@eoconnor95662  schrieb:

This is my code:


 (defun c:test ()
 (command ".layer" "thaw" "*" "")

(princ)

)

 

It returns NIL.


 

Impossible, please load it again and try it again.

Copy & Paste to your commandline, it should also work in 2009

 

Perhaps your Layer are OFF and not freezed, or both?

 

(defun c:test ()
(command "_.layer" "_thaw" "*" "_on" "*" "")
(princ)
)

 

Sebastian

0 Likes
Message 4 of 7

eoconnor95662
Enthusiast
Enthusiast

CMD LOG:

 

Command: appload
selectsimiliar and layuniso.lsp successfully loaded.
Command:
Command:
Command: layuniso
nil

0 Likes
Message 5 of 7

eoconnor95662
Enthusiast
Enthusiast

What it looks like it is doing is it correctly turns the freeze layer on even when returning NIL but the layer doesn't show up on the CAD drawing. I was testing this by using a combination of layiso and layfrz.

 

The objective is to have it turn back on layiso layers and not turn on previously turned off layers.

0 Likes
Message 6 of 7

Kent1Cooper
Consultant
Consultant
Accepted solution

I don't have an answer, nor do I understand what the Thawing in Message 1 has to do with the thread Title.  But maybe you can use a routine I did that improves on certain aspects of LAYISO/LAYUNISO, called LayerIsolateOnOff.lsp available >here<.  See the description there and comments in the file for how the commands defined in it differ from AutoCAD's version.  There's also >another one< that does the same using Freeze and Thaw instead of Off and On, called [logically enough] LayerIsolateFreezeThaw.lsp.

Kent Cooper, AIA
0 Likes
Message 7 of 7

eoconnor95662
Enthusiast
Enthusiast

>here< is exactly what I was looking for. Thanks Kent!

0 Likes