(cond ((and ) ) ((and ) ) ( ))
-David
In case it was missed, the answer is that you CAN use them, but the point is already a list.You made it an embedded list, and that doesn't work as straightforwardly. hi
for what reasom the main() is not calling to getTotalLength()?
(defun c:main () (setq totLng getTotalLength) (princ) )(defun getTotalLength ( / ptst pten d n6 n8 n1 n2 n k stpt enpt ) (princ "getting the total length of the line") (setq ptst (getpoint "\nStart point of line : ")) (setq pten (getpoint ptst "\nEnd point of line : ")) (setq ptst (trans ptst 1 0) pten (trans pten 1 0)) (setq d (distance ptst pten)) )(defun getSegmentLength () (princ) )
Thanks
Shay To solve your error:
(defun c:main ( / totLng ) (setq totLng (getTotalLength)) (princ))(defun getTotalLength ( / ptst pten d ) (princ "getting the total length of the line") (setq ptst (getpoint "\nStart point of line : ")) (setq pten (getpoint ptst "\nEnd point of line : ")) (setq ptst (trans ptst 1 0) pten (trans pten 1 0) ) (setq d (distance ptst pten)))(defun getSegmentLength ( ) (princ))However, for what the code is doing, it could be simply:
(defun c:main ( / totLng ) (setq totLng (getdist "\nPick Distance: "))) Thanks Lee
i need the ptst and pted location so i cant use getdist()
http://www.cadtutor.net/forum/showthread.php?77725-divide-a-line-equally-but-with-a-few-restrictions&highlight=samifox hi
im learning how too access element in lists , why its so hard?
i tried to write a program that assign 1-10 to a veriable and thanprints all elements one by one. of course i end up with ugly error
how to do it right?
;**accessing single element of a list page 17*;(defun c:abcd() (setq pt1(list 1 2 3 4 5 6 7 8 9 0)) (princ (car pt1)) (princ (cdar '(pt1))) )
Thanks
Shay
页:
1
[2]