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