Esnap overrides in lisp
I'm trying to migrate my lisp routines from Autocad to Bricscad. I'm having trouble getting the esnap overrides to work in this code:
(setvar "osmode" 4) (command "_arc" pause "non" pause pause)
In Autocad this sets CENTER osnap for the ends of the arc but no osnap for the intermediate point of the arc.Any assistance would be appreciated. Also, is there a help file or tutorial for lisp in Bricscad?
Comments
-
Generally, lisp in BricsCad seems pretty compatible to the latest Autolisp. In this case, though, I think you've found a bug, or maybe two.I notice that if I try to do the same thing on the command line it won't pick a point with the "none" override or with "Clear Entity Snaps" chosen from the right-click override menu. So there seems to be something wrong with that override.But I also can't find any way to insert an osnap override in a lisp routine the way you want to do it. I don't know whether that's a bug or it's just not supposed to work that way. You can input the 3 points first, with osnaps set for each getpoint, and feed them to the arc command as symbols. But then you don't get the rubber banding.You should file a bug report on the "support" page. They usually fix these things quickly.
0 -
The osmode works ok for me, but I don't think there is any such thing as "pause" in Icad's lisp and I have never seen "non" as an option for the Arc command.You might try (getpoint) in place of pause.
0 -
Good idea, John. That works.(command "arc" (getpoint) "non" (getpoint))I've used (command pause) in a number of lisps, and I just tried this and found it works: (command "pline" pause "0,0" pause)but not this:(command "pline" pause "endp" pause)
0 -
"Pause" is suported in V8, but based on posts in another thread I found here, at this point it works with some commands but not with others. They are working on this and expect to have this fixed within a few weeks. I didn't write down the name of the thread, but it's one of the top few if you search here for "pause".Martin
0 -
I seem to remember trying to use pause years ago, perhaps in Acad, but it didn't work then so never tried since."Non" doesn't do anything here??
0 -
(command pause) is supported in V8. If you find a situation where it doesn't work as you expect, please file a support request so we can fix it. There is a known problem with the combination of (command pause) and temporary snap overrides, like in the example : (command "pline" pause "endp" pause). This is fixed, it will be available in the next release.
0 -
Pieter,The problem I had was with esnap overrides, so I'll wait until the next release.Thanks.Martin
0 -
Since "non" is not a command, was it defined somewhere else? or should it be "none"? or..(defun non() (setq osm (getvar "OSMODE")) (setvar "OSMODE" 0) (getpoint) (setvar "OSMODE" osm))Something like that..just typing.
0