回覆列表
  • 1 # 使用者8139649626132

    (princ "\n程式:統計線段長度 命令:zz")

    (defun C:zz (/ CURVE TLEN SS N SUMLEN)

    (vl-load-com) (setq SUMLEN 0)

    (setq SS (ssget "((0 . "CIRCLE,ELLIPSE,LINE,*POLYLINE,SPLINE,ARC"))))

    (setq N 0)

    (repeat (sslength SS)

    (setq CURVE (vlax-ename->vla-object (ssname SS N)))

    (setq TLEN (vlax-curve-getdistatparam CURVE (vlax-curve-getendparam CURVE)))

    (setq SUMLEN (+ SUMLEN TLEN))

    (setq N (1+ N))

    )

    (princ (strcat "\n共選擇 " (itoa (sslength SS)) " 條線段. 線段總長: " (rtos SUMLEN 2 3) " .")) (princ)

    )

  • 中秋節和大豐收的關聯?
  • 急求一篇1000字左右的撤銷記過處分的申請書?