CAD/CAM discussion forum > CAD > ZWCad, Autolisp and the UNDO command

ZWCad, Autolisp and the UNDO command

Rank: 1

Bwana

Newbie

posts: 20

Registered: 2009-3-4

Message 1 of 4

05-07-2009 03:30 . am | View his/her posts only
After spending many many hours analyzing problems I'm having with the UNDO command, I arrived at the conclusion that the presence of lisp routines causes the UNDO command to become dysfunctional. I have up to now always invoked lisp routines via customised pulldown menus and keyboard hotkeys. This means that the lisp routine or routines are lurking in the background for the duration of the session.

My experience has been that as soon as a lisp routine is invoked, either by means of a keyboard hotkey, or a pulldown menu, the UNDO command becomes dysfunctional. The UNDO item under EDIT becomes greyed out, and UNDo cannot be invoked by any means whatsoever. A partial, but clumsy, remedy seems to be to save the drawing, whereafter UNDO again works properly until a lisp routine is called up.

This leaves me with the agonizing choice of abandoning hundreds of hours of lisp programmes developed over almost twenty years, or abandoning ZWCad. I think lisp development will win the contest...unless of course R&D at ZW Cad pays attention to this shortcoming.

Moral of the story is that ZWCAD and Autolisp may not be such good friends as the salespeople would like us to believe.




Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 2 of 4

05-07-2009 11:55 . am | View his/her posts only
Hello (setq),



I'm using ZwCAD with my own lisp programs and I haven't deal yet with
the bug you mentioned.
I wonder if you are missusing the Undo command inside your lisp
routines.
I use initiallization and termination subs inside every routine, so I
can set the original state of variables, layers, properties, etc.
after a lisp ejecucion.
In example: in my inicialization sub I use (command "undo" "begin"),
then in the finalization sub I use (command "undo" "end"),
I also use that expresions in a error trapper sub (if the lisp routine
fails in the middle of some



Rank: 1

Bwana

Newbie

posts: 20

Registered: 2009-3-4

Message 3 of 4

07-07-2009 01:47 . pm | View his/her posts only
> I'm using ZwCAD with my own lisp programs and I haven't deal yet
> with the bug you mentioned.

OK, how exactly do you start the lisp programs ? I start mine from
customised pulldown menus and keyboard hotkeys. This means they sit
and wait while the session is in progress. The longer the session
lasts, the more programmes sit and wait. I've never experienced any
hiccups in Autocad following the same procedure.



> I wonder if you are missusing the Undo command inside your lisp
> routines.

Nowhere in the lisp programs do I use the UNDO command. I assigned
UNDO to the U key in the ALIAS function inside ZWCAd

> I use initiallization and termination subs inside every routine, so I
> can set the original state of variables, layers, properties, etc. after
> a lisp ejecucion.

As far as possible I also try to reset everything, but I do not
think this should cause any problems. Just some irritation perhaps.
I may sit with a different UCS or angular units after lisp, but
notheing that cannot be reset quickly.


Rank: 1

Bwana

Newbie

posts: 20

Registered: 2009-3-4

Message 4 of 4

07-07-2009 01:56 . pm | View his/her posts only

This problem has been reported by another distributor/dealer on the mailing list at Googlegroups. Hopefully the matter will be taken up by the people at ZWcad.

Indeed a serious problem. There must be hundreds if not thousands of users who bring with them decades of in-house developed custom lisps. If I/we/they have to choose between ZWCAd and custom programmes, the choice is obvious.

Like another user once said, at a tenth of the price something will have to be sacrificed. As long as I know the problem is receiving attention, a reasonable time is not much to ask. But if the problem persists, a choice will eventually have to be made.


(setq)2009-07-07 13:57:44
See also