Author Topic: the 'UB' command  (Read 2838 times)

0 Members and 1 Guest are viewing this topic.

idrawwithcad

  • Guest
the 'UB' command
« on: October 12, 2005, 07:02:31 PM »
Hi all,

One of the guys here in our office has made the mistake of typing 'UB' into his command line a couple of times now and somehow managing to undo everything he has done since the file was opened, even if he has made saves along the way    :realmad:

As we do a lot of structural steel work, UB is something that we type in quite a bit (sposed to be text though, not in the command line!) so we decided we would like to overwrite the command with save.  However, we cant find the command anywhere, its not in the pgp, and even if we write a new command in the pgp with the u & b keys to activate it, it still calls up the undo to the beginning command    :ugly:

Does anyone know much about this command, or how we can disable it? 

Thanks guys!

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: the 'UB' command
« Reply #1 on: October 12, 2005, 07:11:35 PM »
UB? Never heard of it. It may be a custom command -- either someone has penned a (defun c:UB ( ) ...) somewhere or it's defined in an arx etc.

Regardless ...

If said command "undo's all the way back", "even if he has made saves along the way" then said user should immediately close the drawing without saving, and any edits up to his last save should be intact.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Bob Wahr

  • Guest
Re: the 'UB' command
« Reply #2 on: October 12, 2005, 07:12:20 PM »
You haven't looked everywhere because somewhere, and I'm guessing it is done with lisp, UB has been set up to do "UNDO B(ack) Y(es)"
 check any mnl files that are loading as well as any lisps that load automatically.

Chuck Gabriel

  • Guest
Re: the 'UB' command
« Reply #3 on: October 12, 2005, 07:13:54 PM »
Sounds like a lisp routine to me.  Unfortunately, there are quite a few possible sources.

1) acad.lsp
2) acaddoc.lsp <- (is that right?)
3) .mnl file associated with one of your menus
4) a file loaded by either of the preceeding two
5) Startup Suite

You could try doing a search for files that contain the text "c:ub".

Bob Wahr

  • Guest
Re: the 'UB' command
« Reply #4 on: October 12, 2005, 07:27:35 PM »
If I'm right that it's an UNDO Back, not UNDO BEgin, you could load this as a DVB.
Code: [Select]
private sub AcadDocument_EndCommand(byval commandname as String)
thisdrawing.sendcommand "undo m" & vbcr
end sub

Bob Wahr

  • Guest
Re: the 'UB' command
« Reply #5 on: October 12, 2005, 07:32:22 PM »
or something like
Code: [Select]
private sub AcadDocument_BeginLisp(byval firstline as string)
for intCnt = 1 to len(firstline)
  if ucase(mid(firstline, intcnt, 4)) = "C:UB" then
    sendkeys "{ESC}{ESC}{ESC}"
    exit for
  end if
next intcnt
end sub

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the 'UB' command
« Reply #6 on: October 12, 2005, 07:40:58 PM »
Does he have a file named AU_Sample.LSP

with something like  this :
Code: [Select]
(defun C:UB ()
    (command ".UNDO" "End")
    (command ".UNDO" "Back" "Y")
    (princ)
)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the 'UB' command
« Reply #7 on: October 12, 2005, 07:44:12 PM »
[offTopic]
Your Local time puts you somewhere between Aus' East coast and New Zealand. Didn't know there were any Steel Fabricators out there.

:)

[/OT]
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

idrawwithcad

  • Guest
Re: the 'UB' command
« Reply #8 on: October 12, 2005, 09:43:29 PM »
well found the culprit, it was part of an AutoCAD plug in that we run called "struc-plus"

why on earth anyone would create a button that undoes everything back to the beginning with the default of <Y> and no decent warning is beyond me - but its gone now anyway!

thanks folks!

idrawwithcad

  • Guest
Re: the 'UB' command
« Reply #9 on: October 12, 2005, 09:45:04 PM »
[offTopic]
Your Local time puts you somewhere between Aus' East coast and New Zealand. Didn't know there were any Steel Fabricators out there.

:)

[/OT]

hehe ahhh yes

ummm maybe im on an oil rig  :roll:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the 'UB' command
« Reply #10 on: October 12, 2005, 09:54:59 PM »
.....  it was part of an AutoCAD plug in that we run called "struc-plus"


Send Peter a note and ask him. Doesn't sound like something he'd do.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: the 'UB' command
« Reply #11 on: October 12, 2005, 10:25:44 PM »
Quinn?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: the 'UB' command
« Reply #12 on: October 12, 2005, 10:27:36 PM »
Coburn
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: the 'UB' command
« Reply #13 on: October 12, 2005, 10:28:26 PM »
Oh "that" Peter; duh-me.

:D
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst