Author Topic: redefining qleader  (Read 2124 times)

0 Members and 1 Guest are viewing this topic.

DEVITG

  • Bull Frog
  • Posts: 481
redefining qleader
« on: February 20, 2005, 06:52:39 PM »
Despite the is not a god rule to redefine ACAD command, and as ACAD allow it.
Why when undefining the  qleader command it can not override it by the ".qleader" , a period b4 the command

    (command "undefine" "qleader")

    (defun c:qleader (/ )



      (if (= nil (tblsearch "layer" "SML-TEXT"))     ; chek if layer exist
        (command "-layer" "m" "SML-TEXT" "" "")     ;make if the layer do not exist
        (COMMAND "-LAYER" "S" "SML-TEXT" "")        ;SET TO "SML-TEXT" IF EXIST
      ) ;_end if

    (COMMAND   ".qleader")
     (princ)
      )
     
     [/list:u]








    I got this message

Quote
Command: qleader
-layer
Current layer:  "0"
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
m
Enter name for new layer (becomes the current layer) <0>: SML-TEXT Enter an
option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:
Command: QLEADER Unknown command "QLEADER".  Press F1 for help.


The task to do is : to draw all the qleaders on the same layer , no matter which layer is set.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
redefining qleader
« Reply #1 on: February 21, 2005, 08:29:49 AM »
Try this:
Code: [Select]
(command "undefine" "qleader")

(defun c:qleader ()
  (if (tblsearch "layer" "SML-TEXT") ; chek if layer exist
    (command "-LAYER"  "Thaw" "SML-TEXT"  "On" "SML-TEXT"  "Unlock" "SML-TEXT"
             "S" "SML-TEXT" "") ;SET TO "SML-TEXT" IF EXIST
    (command "-layer" "m" "SML-TEXT" "") ;make if the layer do not exist
  ) ;_end if
  (command ".qleader")
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

DEVITG

  • Bull Frog
  • Posts: 481
redefining qleader
« Reply #2 on: February 21, 2005, 09:03:37 AM »
Hi Cab , it make the same error.
Quote
Command: .qleader Unknown command "QLEADER".  Press F1 for help.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10