why does not work like do this~
(setq P2 (getpoint p1 (strcat "@" (rtos xx 2 0) "<0") ""))
I want to know,
please just edit...
;======================================================
(defun c:form ( )
(setq dsc (getvar "dimscale"))
(setq xx (* 10 dsc))
(if (= SPC nil)(setq SPC 9))
(setq P1 (getpoint "\nstart point : "))
;(setq P2 (getpoint P1 "\nent point : ")
(setq P2 (getpoint p1 (strcat "@" (rtos xx 2 0) "<0") ""))
(setq ROW (getint "\nrow : "))
(setq COLM (getint "\ncolumn : "))
(setq DST (distance P1 P2))
(setq DST1 (/ DST COLM))
(setq COLMM (+ COLM 1))
(setq ROWW (+ ROW 1))
(setq PP1 P1)
(setq PP2 P2)
(setq SPCC (getreal (strcat "\nheight :<"(rtos SPC)"> : ")))
(if (numberp SPCC)(setq SPC SPCC))
(setq SPC1 (* _SC SPC))
(repeat ROWW
(command "line" P1 P2 "")
(setq P1 (polar P1 (dtr 90) SPC1)
P2 (polar P2 (dtr 90) SPC1)
)
)
(command "line" PP1 (polar PP1 (dtr 90) (* ROW SPC1)) "")
(command "line" PP2 (polar PP2 (dtr 90) (* ROW SPC1)) "")
(repeat (- COLM 1)
(setq PP1 (polar PP1 (dtr 0) DST1))
(command "line" PP1 (polar PP1 (dtr 90) (* ROW SPC1)) "")
)
(princ)
)
Hi,
You have an extra "" as an argument to the setq, mey be this: (setq p2 (getpoint p1 (strcat "@" (rtos xx 2 0) "<0")))
Gaston Nunez
I could be wrong about my interpretation but, are you trying to get the getpoint to return a point programatically without user input. If so, then that is the wrong use of getpoint. Getpoint is for user input. If you want a programmatically retuned point then use a different function like
(polar p1 0 xx) or
(list (+ xx (car p1)) (cadr p1) (caddr p1))
I see what p_mcknight is saying. In which case couldn't you just leave the getpoint function out and receive the results of just the equation?.....scratch that..... I just tried it and it didn't work..... sorry.