SCRIPTs command !!!

    
  Subscribe Topic

Rank: 1

Atabey37

Newbie

posts: 0

Registered: 2011-12-1

Message 1 of 6

02-03-2011 08:54 . am   |   View his/her posts only
hi

i cant work Z50.scr in zwcad.lsp !!!

(DEFUN C:Z20 () (COMMAND "SCRIPT" "Z50.scr"))

only i can work script commad and chose z50.scr

but i want to work directly in lsp ....

Rank: 1

Atabey37

Newbie

posts: 0

Registered: 2011-12-1

Message 2 of 6

02-03-2011 09:02 . am   |   View his/her posts only
[QUOTE=Atabey]hi

i cant work Z50.scr in zwcad.lsp !!!

(DEFUN C:Z50 () (COMMAND "SCRIPT" "Z50.scr"))

only i can work script commad and chose z50.scr

but i want to work directly in lsp ....

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 3 of 6

03-03-2011 03:07 . pm   |   View his/her posts only

[QUOTE=Atabey]hi

i cant work Z50.scr in zwcad.lsp !!!

(DEFUN C:Z20 () (COMMAND "SCRIPT" "Z50.scr"))

only i can work script commad and chose z50.scr

but i want to work directly in lsp ....


what kind of error ?
your scr file under Zwcad support path
j.

Rank: 1

Atabey37

Newbie

posts: 0

Registered: 2011-12-1

Message 4 of 6

04-03-2011 08:08 . am   |   View his/her posts only
yes scr files under Zwcad support patch...

Problem:

scr files cant work in lsp files

for exmp:

z50.scr this

ZZ
0
50
2


zwcad.lsp this

;;;
;;; zwCAD.LSP 1999
;;; prog by Atabey
;;;
;;;
(vmon)
(DEFUN C:ZZ ( / )
(SETVAR "CMDECHO" 0)
(SETVAR "MENUECHO" 3)
(SETQ SF 0.0)
(SETQ KB (GETREAL"'nPaper Size A ( 0(90) 1(75) 2(60) 3(45) 4 ):"))
(SETQ OL (GETINT "'nScale 1 / ? (SADECE PAYDA):"))
(SETQ BR (GETINT "'nUnit 1 (m) 2 (cm) 3 (mm):"))

(COND ((= BR 1) (SETQ OC (* 1.0 OL))))
(COND ((= BR 2) (SETQ OC (* 100.0 OL))))
(COND ((= BR 3) (SETQ OC (* 1000.0 OL))))
(COND ((= KB 0) (SETQ XL (* 1.50 OC) YL (* 0.905 OC))))
(COND ((= KB 1) (SETQ XL (* 1.00 OC) YL (* 0.750 OC))))
(COND ((= KB 2) (SETQ XL (* 1.00 OC) YL (* 0.600 OC))))
(COND ((= KB 3) (SETQ XL (* 1.00 OC) YL (* 0.458 OC))))
(COND ((= KB 4) (SETQ XL (* 0.255 OC) YL (* 0.165 OC))))
(COND ((= KB 1.5) (SETQ XL (* 1.00 OC) YL (* 0.70 OC))))
(COND ((= KB 6) (SETQ XL (* 0.900 OC) YL (* 0.600 OC))))
(SETVAR "LUNITS" 2)
(SETVAR "INSUNITS" 4)
(SETVAR "LUPREC" 3)
(SETVAR "UCSICON" 2)
(SETVAR "AUNITS" 0)
(SETVAR "APERTURE" 5)
(SETVAR "PICKBOX" 4)
(SETVAR "AUPREC" 0)
(SETVAR "ANGBASE" 0.0)
(SETVAR "REGENMODE" 1)
(SETVAR "ANGDIR" 0)
(SETVAR "PDMODE" 35)

(SETVAR "CMDECHO" 1)
(SETVAR "MENUECHO" 0)
(GRAPHSCR)
(REDRAW)
)

;------------------****-----------------****---------------------
; KISALTILMIS KOMUTLAR
(DEFUN C:M () (COMMAND "MOVE" "AUTO"))
(DEFUN C:T () (COMMAND "TRIM" "AUTO"))
(DEFUN C:EW () (COMMAND "ERASE" "W"))
(DEFUN C:Z50 () (COMMAND "SCRIPT" "Z50" "")) ;;;; dont work !!!!!
(DEFUN C:DH () (COMMAND "DIM" "HORIZ"))
(DEFUN C:DV () (COMMAND "DIM" "VERTICAL"))
(DEFUN C:A () (COMMAND "ARRAY"))
(DEFUN C:O () (COMMAND "_OFFSET"))

this files work in Autocad !

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 5 of 6

04-03-2011 03:04 . pm   |   View his/her posts only

why not like this (not script) ?

(defun C:Z50 ()
(ZZ 0 50 2)
(princ)
)

(defun C:ZZ ()
(ZZ nil nil nil)
(princ)
)


(DEFUN ZZ (v1 v2 v3 / )
(SETVAR "CMDECHO" 0)
(SETVAR "MENUECHO" 3)
(SETQ SF 0.0)
(if (and v1 v2 v3)
(setq KB v1 OL v2 BR v3)
(progn
(SETQ KB (GETREAL"'nPaper Size A ( 0(90) 1(75) 2(60) 3(45) 4 ):"))
(SETQ OL (GETINT "'nScale 1 / ? (SADECE PAYDA):"))
(SETQ BR (GETINT "'nUnit 1 (m) 2 (cm) 3 (mm):"))
)
)
....

j.

jason2011-03-04 15:04:56

Rank: 1

Atabey37

Newbie

posts: 0

Registered: 2011-12-1

Message 6 of 6

04-03-2011 04:28 . pm   |   View his/her posts only
ok m8 very thx

problem was resolved

and other way for scr files...

scr files work on tolbar or puldown menu

for exmp

^c^c script z50.scr...
See also
X