2010-12-06 15:40 UTC
having an issue with a project im working on.
the following code works however when trying to send a acad command thru i get a "too many arguments" error
can someone point out what im doing wrong?
the following code works however when trying to send a acad command thru i get a "too many arguments" error
can someone point out what im doing wrong?
(defun zoomtext (/)
(command "_.zoom" "_w" xy1 xy2)
)
(defun c:oSTKBK_Form1_find_OnClicked (/)
(SETQ SS1 (SSGET "X" (LIST (CONS 0 "TEXT"))))
(SETQ SSL (SSLENGTH SS1))
(SETQ CNT1 0)
(setq kk "Next")
(SETQ OLDS (strcase (dcl_Control_GetText oSTKBK_Form1_TextBox1)))
(WHILE (and (SETQ EN (SSNAME SS1 CNT1)) (eq kk "Next"))
(SETQ ED (ENTGET EN))
(SETQ ET (CDR (ASSOC 1 ED)))
(IF (WCMATCH ET (STRCAT "*" OLDS "*")) (PROGN
(setq x1x (car (cdr (assoc 10 ed))))
(setq y1y (cadr (cdr (assoc 10 ed))))
(setq sclxy (CDR (assoc 40 ed)))
(setq x2x (rtos (- x1x (* sclxy 30))))
(setq x3x (rtos (+ x1x (* sclxy 30))))
(setq y2y (rtos (+ y1y (* sclxy 20))))
(setq y3y (rtos (- y1y (* sclxy 20))))
(setq xy1 (strcat x2x "," y3y))
(setq xy2 (strcat x3x "," y2y))
(dcl_sendstring "_.zoom" "_w" xy1 xy2) <--- this is the issue
(dcl_sendstring "zoomtext ") <-- this doesnt work either
(setq xyx 1)
(setq lyr1 (cdr (assoc 8 ed)))
(setq lyr2 "0")
(while (<= xyx 5)
(setq ed (subst (cons 8 lyr2) (assoc 8 ed) ed))
(entmod ed)
(setq ed (subst (cons 8 lyr1) (assoc 8 ed) ed))
(entmod ed)
(setq xyx (+ xyx 1))
);end while
(defun c:oSTKBK_Form1_next_OnClicked (/)
(setq kk "Next")
)
)
)
(SETQ CNT1 (1+ CNT1))
)
) ; end find onclick
[\code]
any help is appreciated