Author Topic: command "._undefine" within routine  (Read 5508 times)

0 Members and 1 Guest are viewing this topic.

Joe Burke

  • Guest
command "._undefine" within routine
« on: August 30, 2009, 09:20:07 AM »
Using 2008, the following test code seems to indicate a command cannot be undefined within a LISP routine. The (command "._line") call still works, rather than returning unkown command.

Code: [Select]
(defun c:testundefine ( )
  (command "._undefine" "._line")
  (command "._line")
  (while (> (getvar "cmdactive") 0) (command pause))
  (command "._redefine" "._line")
)

TIA for any thoughts on this.

gile

  • Gator
  • Posts: 2508
  • Marseille, France
Re: command "._undefine" within routine
« Reply #1 on: August 30, 2009, 09:31:33 AM »
Hi Joe,

AFAIK, "._line" or "_.line" (with the dot) cannot be undefined, so that you can always get the native function using this syntax.

You'd rather try :

(command "_.undefine" "_line")

then this (which souldn't work):

(command "_line")
(while (> (getvar "cmdactive") 0) (command pause))

and this (which should works):

(command "_.line")
(while (> (getvar "cmdactive") 0) (command pause))
Speaking English as a French Frog

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: command "._undefine" within routine
« Reply #2 on: August 30, 2009, 10:28:20 AM »
Correct Gile,

The "." means revert to the original default AutoCAD command (and can't be undefined), and, of couse, "_" enables language compatibility.

See here Joe:

http://www.cadforum.cz/cadforum_en/qaID.asp?tip=2425

Lee

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #3 on: August 30, 2009, 11:36:54 AM »
Gile and Lee,

Thanks for your comments. I understand.

But I still have a problem with (command "._undefine"... because the command I'm trying to undefine is "_3dorbittransparent". This command is called in 2008 if you hold the shift key and mouse down with the scroll button.

The reason I'm trying to undefine "_3dorbittransparent" is so when the ExpressTools function (acet-sys-shift-down) is called, the "_3dorbittransparent" command should be disabled.

Hope this makes some sense.

Spike Wilbury

  • Guest
Re: command "._undefine" within routine
« Reply #4 on: August 30, 2009, 12:46:02 PM »
Hola Jose,

If my brain still works.... I recall that we need to add the prefix of the command group... on this one is ACAD_VMTOOLS

I remember when did some undefinitions of the dimension commands.... some moons ago.

HTH!

Luis.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: command "._undefine" within routine
« Reply #5 on: August 30, 2009, 02:15:26 PM »
You may need to track down where the "shift key and mouse down with the scroll button" is in the menu file and see if it
calls the command with the . and remove it.
« Last Edit: August 31, 2009, 09:30:27 AM by CAB »
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.

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #6 on: August 31, 2009, 09:27:00 AM »
Thanks Luis and CAB. I will investige further.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: command "._undefine" within routine
« Reply #7 on: September 01, 2009, 12:54:54 AM »
You may need to track down where the "shift key and mouse down with the scroll button" is in the menu file and see if it
calls the command with the . and remove it.


it's under the mouse button section in the cui editor.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #8 on: September 01, 2009, 08:28:47 AM »
The mystery remains and I'm stumped.

The 3dorbittransparent command is defined.

Command: 3dorbittransparent
Regenerating model.

Command: (command "._undefine" "_3dorbittransparent")
._undefine Enter command name: _3dorbittransparent
Command: nil

Command: 3dorbittransparent
Unknown command "3DORBITTRANSPARENT".  Press F1 for help.

Command: line
Specify first point:
Specify next point or [Undo]:  Regenerating model.

Comment: "Regenerating model" because shift key down and wheel button down. IOW, within the line command the fact 3DORBITTRANSPARENT is undefined seems to be ignored. It works as if it was not undefined.

Resuming LINE command.
Specify next point or [Undo]: *Cancel*


Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: command "._undefine" within routine
« Reply #9 on: September 01, 2009, 08:39:55 AM »
Did you try Luis' suggestion, using: ACAD_VMTOOLS
?

Lee

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #10 on: September 01, 2009, 08:54:37 AM »
Lee,

I did, but I was unsure about the syntax and it did not work. Can you give me an example?

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: command "._undefine" within routine
« Reply #11 on: September 01, 2009, 08:57:53 AM »
I haven't tried it personally, but, just testing your previous post, if I enter at the command line:

Code: [Select]
Command: UNDEFINE
Enter command name: _3Dorbittransparent

Unknown command name.
Command: UNDEFINE
Enter command name: 3dorbit

Unknown command name.
Command: UNDEFINE
Enter command name: _3dorbittransparent

Unknown command name.

It doesn't recognise anything at all it seems...  :?

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #12 on: September 01, 2009, 09:08:25 AM »
Lee,

What version are you using?

Lee Mac

  • Seagull
  • Posts: 12916
  • London, England
Re: command "._undefine" within routine
« Reply #13 on: September 01, 2009, 09:08:49 AM »
2010 Student Version  :-)

Joe Burke

  • Guest
Re: command "._undefine" within routine
« Reply #14 on: September 01, 2009, 09:16:19 AM »
Maybe the 2010 student version does not include some of the commands available in vanilla 2008?