Hello guys, I've got a problem..
I need to undefine a command defined in "#oninitialize" but it doesn't work..
Maybe it's something like synchronous/asynchronous but why it works on #oninitialize?
(defun C:cancella (/ i deleted )
(setq deleted (ssget)
i 0)
(repeat (sslength deleted)
(entdel (ssname deleted i))
(setq i (1+ i))
)
(conta_elementi nome)
;(princ)
)
and
(defun c:Cobiax/Main#OnClose (UpperLeftX UpperLeftY /)
(setvar "CMDECHO" 0)
(vl-cmdf "_redefine" "cancella")
(setvar "CMDECHO" 1)
)
Thanks, Dennis
Hi, Lube, modeless or modal form? Just some thoughts without having some tests yet:
In modeless forms there is a event invoke property as well as it is for the controls on modeless forms. Maybe switch it to allow command.
Or you call the command using dcl_delayedinvoke to call it asynchronously.
Regards, Fred
Hello Fred! It's a palette.. Can you be a little bit more precise?
Thanks, Dennis
Guys I really need help in this.. I'm getting mad :'(
(defun C:cancella (/ i deleted )
(IF (dcl-Form-IsActive Cobiax/Main)
(progn
(princ "\n Selezionare gli alleggerimenti da eliminare")
(setq deleted (ssget)
i 0)
(repeat (sslength deleted)
(entdel (ssname deleted i))
(setq i (1+ i))
)
(conta_elementi nome)
)
(progn
(redef "cancella")
(redef "erase")
(command "._erase")
)
)
;(princ)
)
I've tryed this way but it lose the shortcut in the first cicle :/
Quote from: Lube on January 04, 2016, 09:55:14 AM
Hello Fred! It's a palette.. Can you be a little bit more precise?
Thanks, Dennis
I think it is you who should try to be more precise. It will help if you explain better and perhaps post some files.