User
 Forgot password?
 Register
Search
Forum ZWCAD CAD Content
Post time 2014-3-7 14:57:33
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!!
Post time 2014-3-7 15:13:00
ich glaube so  "_int"
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".
Post time 2014-3-7 18:47:38
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)
)
Post time 2014-3-10 15:48:19
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
Post time 2014-3-10 16:51:12
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" "")
Post time 2014-3-10 18:19:26
Hey Dober, thanks for the support and the immediate reply.

I m glad to say that the script work.

Thanks a ton :)
New
You have to log in before you can reply Login | Register