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: ")))
|