CAD/CAM discussion forum > CAD > OSNAP command in Autolisp

OSNAP command in Autolisp

    
  Subscribe Topic

Rank: 1

Bwana

Newbie

posts: 20

Registered: 2009-3-4

Message 1 of 10

 OSNAP command in Autolisp
13-05-2010 12:49 . am   |   View his/her posts only
The following line of lisp code should return point p1 only if an
intersection
is found. If no intersection is found, it will return
NIL.

(setq
p1 (osnap (getpoint "'Pick intersection: ") "int"))

It works
perfectly in 2009i, but crashes in 2010.

If the safety feature is
omitted, namely:

(setq p1 (getpoint "'Pick point: ") )

it
works in 2010, but it will now snap onto anything, even a void.

Rank: 5Rank: 5

Eric_ZWSOFT

posts: 13

Registered: 2011-7-18

Message 2 of 10

10-05-2010 10:15 . am   |   View his/her posts only
hi,setq,

your id is very interesting, is it a assignment function ?
to be frankly ,i know a little about programme ,but i just know little about lisp .
i tried (setq p1 (osnap (getpoint "'Pick intersection: ") "int")) in zwcad 2010 (_VERNUM = "2010.04.30(14725)") ,it works well ,returns the coordinates of the intersection i osnap. If no intersection is found, it will return NIL.
BTW,zwcad2010((_VERNUM = "2010.04.30(14725)")) will be released in MAY.
if the problem still exist , would you please kindly send your the problem to tech@zwcad.com via email and tell me the vernum of zwcad you are using . It is better to make a movie to record the operations you have done before the problem occured. In this case, we could verify the problem easily. After receiving your email, we will try to find a solution for the problem as soon as possible. Thanks in advance.

have a nice day and wish to learn more from you ~~

EricEric2010-05-10 10:17:41

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 3 of 10

13-05-2010 12:49 . am   |   View his/her posts only
tested....

Osnap in version 2010 is not working...but it work on 2010 beta.
just be sure to put the Underscore on the snap settings

eg: "_end"Andrea2010-05-13 00:53:02

Rank: 5Rank: 5

Eric_ZWSOFT

posts: 13

Registered: 2011-7-18

Message 4 of 10

13-05-2010 10:57 . am   |   View his/her posts only
[QUOTE=Andrea]tested....

Osnap in version 2010 is not working...but it work on 2010 beta.
just be sure to put the Underscore on the snap settings

eg: "_end"

hi,Andrea,
thank you for you sharing~~

have a nice day

Eric

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 5 of 10

14-05-2010 12:38 . am   |   View his/her posts only
[QUOTE=Eric][QUOTE=Andrea]tested....

Osnap in version 2010 is not working...but it work on 2010 beta.
just be sure to put the Underscore on the snap settings

eg: "_end"

hi,Andrea,
thank you for you sharing~~

have a nice day

Eric


No problem.. i'm here to help !

;-)

Rank: 1

Bwana

Newbie

posts: 20

Registered: 2009-3-4

Message 6 of 10

18-05-2010 06:49 . am   |   View his/her posts only
Ok thanks all, do I assume then that the osnap problem has been fixed
and will work correctly in (_VERNUM = "2010.04.30(14725)") ??





It is now middle May, has this version been released yet ?





Thanks

ps. Yes , Eric, my ID is a reference to the asign function in LISP, namely setq. I think it appropriate for postings where LISP is discussed. Been programming LISP since 1980....

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 7 of 10

18-05-2010 10:32 . pm   |   View his/her posts only
yep, some problem was fixed......but still some other.
i've received some e-mail from ZWCAD telling that they work on submitted problems....I think this is a good news. ;-)
Because as i've seen......they're serious.

Big%20smile

Rank: 1

_mac

Newbie

posts: 0

Registered: 2010-8-17

Message 8 of 10

19-07-2010 03:27 . pm   |   View his/her posts only
I have a similar problem but with the osnap "per", can someone confirm this.

(command "line" p1)
(setq p2 (osnap (getpoint "'nPick point: ") "per"))

These lines worked in ACAD but not in ZWCAD.

Rank: 1

_mac

Newbie

posts: 0

Registered: 2010-8-17

Message 9 of 10

27-07-2010 10:18 . am   |   View his/her posts only
[QUOTE=_mac] I have a similar problem but with the osnap "per", can someone confirm this.

(command "line" p1)
(setq p2 (osnap (getpoint "'nPick point: ") "per"))

These lines worked in ACAD but not in ZWCAD.

Anyone from zwcad care to comment on this?

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 10 of 10

27-07-2010 11:33 . am   |   View his/her posts only
Hello _mac,

Thank you very much for your feedback and we are sincerely sorry for the late reply. We have tested and verified the problem. It did exist in the ZWCAD 2010. The problem will be sent to our R&D department and will be fixed as soon as possible. If there is any progress about it, we will post the information on this forum soon.

Sincerely sorry for any convenience.

Best Regards,

Yours sincerely,

DennyDaniel2010-07-27 11:52:31
See also
X