CAD/CAM discussion forum > CAD > OSNAP error in ZWCAD 2014

OSNAP error in ZWCAD 2014

    
  Subscribe Topic

Rank: 1

george7311

Newbie

posts: 6

Registered: 2012-11-30

Message 1 of 7

 OSNAP error in ZWCAD 2014
07-03-2014 02:57 . pm   |   View his/her posts only
This LISP command is working in ACAD but not in ZWCAD 2014

(DEFUN C:DOR ()
(command "osnap" "int")
(SETQ P1 (GETPOINT "Enter referance point: "))

It generates this error
osnap
Command: int Unknown command "INT".

Please Help!!

Rank: 3Rank: 3

Dober

Junior Engineer

posts: 145

Registered: 2011-9-22

Message 2 of 7

07-03-2014 03:13 . pm   |   View his/her posts only
ich glaube so "_int"

Rank: 1

george7311

Newbie

posts: 6

Registered: 2012-11-30

Message 3 of 7

07-03-2014 03:47 . pm   |   View his/her posts only
Sorry..the script is..


(DEFUN C:DOR ()
(command "osnap" "INT")
(SETQ P1 (GETPOINT "Enter referance point: "))

and it still generate the same error
osnap
Command: int Unknown command "INT".

Rank: 3Rank: 3

Dober

Junior Engineer

posts: 145

Registered: 2011-9-22

Message 4 of 7

07-03-2014 06:47 . pm   |   View his/her posts only
Post Last Edit by Dober at 2014-3-7 18:57

(DEFUN C:DOR ()
(command "_-osnap" "_int")
(SETQ P1 (GETPOINT "Enter referance point: "))
(command "line" p1 pause)
)

Rank: 1

george7311

Newbie

posts: 6

Registered: 2012-11-30

Message 5 of 7

10-03-2014 03:48 . pm   |   View his/her posts only
Hey Dober..Thanks for your support.

I m relatively new to ZWCAD and I m not sure the programming methodology used in ZWCAD.

I have this script below which runs in Autocad,

(DEFUN C:DOR ()
(command "osnap" "INT")
(SETQ P1 (GETPOINT "Enter referance point: "))
(command "osnap" "PER")
(SETQ P2 (GETPOINT p1 "Enter second point: "))
(command "osnap" "")
(SETQ RD (GETDIST "Enter referance distance: "))
(if (= rd nil) (setq rd 0))
(SETQ DW (GETDIST "Enter door width: "))
(command "osnap" "NEA")
(setq dir (getpoint "Enter a point for direction: "))
(command "osnap" "")

Kindly suggest which lines and commands are to be modified to ensure they work in ZWCAD

Rank: 3Rank: 3

Dober

Junior Engineer

posts: 145

Registered: 2011-9-22

Message 6 of 7

10-03-2014 04:51 . pm   |   View his/her posts only
I'm also not a professional would say so it goes in ZWCAD.
Bin auch kein Profi würde sagen so geht das in Zwcad.

(DEFUN C:DOR ()
(command "_-osnap" "_INT")
(SETQ P1 (GETPOINT "Enter referance point: "))
(command "_-osnap" "_PER")
(SETQ P2 (GETPOINT p1 "Enter second point: "))
(command "_-osnap" "")
(SETQ RD (GETDIST "Enter referance distance: "))
(if (= rd nil) (setq rd 0))
(SETQ DW (GETDIST "Enter door width: "))
(command "_-osnap" "_NEA")
(setq dir (getpoint "Enter a point for direction: "))
(command "_-osnap" "")

Rank: 1

george7311

Newbie

posts: 6

Registered: 2012-11-30

Message 7 of 7

10-03-2014 06:19 . pm   |   View his/her posts only
Hey Dober, thanks for the support and the immediate reply.

I m glad to say that the script work.

Thanks a ton :)
See also
X