Jump to content


Format Layer Tools


8 replies to this topic

#1 Duarte Ramos

    Newbie

  • Members
  • Pip
  • 5 posts
  • LocationLisbon, Portugal

Posted 26 February 2014 - 02:20 AM

Hello
I've been using NanoCAD for the past couple of days and I am very satisfied, however there is something that I am missing sorely
I needed the old autocad express tools commands like Layon Layoff Layfrz Layth Laylck Layulk Laycr ect

I notices the bundled Usr guide mentions these commands are available, but I cant use them. Also I am missing the Format > Layer Tools menu they were supposed to be in.

Am i missing something here or are these commands some sort of additional addon or plugin you must activate?

#2 Hellen_V

    nanoCAD Team

  • Members
  • PipPipPip
  • 916 posts

Posted 26 February 2014 - 06:36 AM

Hello Duarte,

These commands are available in in NanoCAD Plus version only. You can execute them by opening of the Layers toolbar (Format -> Layers...).
nanoCAD Support Team
support@nanocad.com

#3 Duarte Ramos

    Newbie

  • Members
  • Pip
  • 5 posts
  • LocationLisbon, Portugal

Posted 26 February 2014 - 10:34 AM

Oh ok, that explains why I could not run or find those commands, thanks for the quick reply.

#4 mike

    Newbie

  • Members
  • Pip
  • 1 posts
  • LocationPoland

Posted 02 March 2014 - 11:40 AM

Yes, you can compensate the lack of these commands by using some LISP functions. I'm using some of them. They are not perfect, I'm not a professional lisp coder, but they make a life a bit easier. Feel free to make them better! :D
Functionality:
LL - select object and make it's layer current;
LLO - layer off (select object);
LLF - layer freeze (select object);
LP - back to previous state after LLO or LLF.

In the previous version of nanocad there was a possibility to add isolate function to this, but not any more as far as I know. Or maybe there is a way?

(defun c:ll ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay (cdr (assoc 8 objList)))
(command "_-layer" "s" objLay "")
)
(defun c:llo ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "off" objLay2 "")
)
(defun c:llf ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "FREEZE" objLay2 "")
)

(defun c:lp ()
(command "_-layer" "on" objLay2 "")
(command "_-layer" "THAW" objLay2 "")
)


#5 Duarte Ramos

    Newbie

  • Members
  • Pip
  • 5 posts
  • LocationLisbon, Portugal

Posted 02 March 2014 - 06:21 PM

WOW That is absolutely great, works like a charm!
I actually meant to do exactly that but time was not on my side, and my lisp is really really rusty, it was not very good to start with and I haven't used it in quite a while.
I made a fiew improvements to it, so that the layer off commits immediatly even if it is the current one and I also added a layer lock and unlock to it. I changed the aliases arround to suit my preference but you can easily change them back.


(defun c:lc ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay (cdr (assoc 8 objList)))
(command "_-layer" "s" objLay "")
)

(defun c:lf ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "off" objLay2 "yes" "")
)

(defun c:ll ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "lock" objLay2 "")
)

(defun c:lu ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "unlock" objLay2 "")
)

(defun c:lfr ()
(setq objName (car (entsel)))
(setq objList (entget objName))
(setq objLay2 (cdr (assoc 8 objList)))
(command "_-layer" "FREEZE" objLay2 "")
)

(defun c:lt ()
(command "_-layer" "on" objLay2 "")
(command "_-layer" "THAW" objLay2 "")
)

Thank you so much for sharing this, you just made my life a lot easier!

#6 Luca De Moliner

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 09 July 2015 - 10:41 AM

TY very much for these lisps. Very useful expecially "select objects and make layer current".
To bypass the lack of "isolate current layer" I do this:

"select object and make layer current" (LC)> layer > layer walk
that's IT!
when you finish working on that layer you deactivate layer walk an everything goes back to the previous layer state.

there is a step more to do if compeared to express tools but it's OK.

I come from Autocad and ZwCAD next. NANOCAD rules. I'm seriously considering to buy + version!

congrats to developers

#7 omar moretti

    Member

  • Members
  • PipPip
  • 12 posts

Posted 02 September 2017 - 09:38 AM

think this is what I'm searching for...
anyone can explain me how to add/activate LISP commands?

#8 Hellen_V

    nanoCAD Team

  • Members
  • PipPipPip
  • 916 posts

Posted 12 September 2017 - 10:15 AM

View Postomar moretti, on 02 September 2017 - 09:38 AM, said:

think this is what I'm searching for...
anyone can explain me how to add/activate LISP commands?
use APPLOAD command.
nanoCAD Support Team
support@nanocad.com

#9 Jason Warren

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts
  • LocationUK

Posted 09 November 2022 - 01:05 PM

Hi,
Is there a way to turn a Layer OFF via the command line. eg Command: LAYOFF "Layer Name" <Enter>
Many thanks,
Jason

*Update, all sorted, thank you for the pointers... ;o)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users