树櫴希德 发表于 2023-6-13 20:38:04

这是模仿CASS等高线拟合命令PLIND吗?

(defun c:hqd123 ( / x)
   (acet-ui-progress "已经完成" 100)
   (setq x 0)
   (while (< x 100)
          (princ (strcat "\n" (itoa x)))
          (acet-ui-progress -1)
          (setq x (1+ x))
   )
   (acet-ui-progress)
);;;;;;
;选择集与对象名表互转
(defun cx-ss2en
(ss / enlst)
(cond
    ((= (type ss) 'PICKSET)
      (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) (mapcar 'cadr (ssnamex SS)))
    )
    ((= (type ss) 'LIST)
      (setq enlst (ssadd))
      (last (mapcar '(lambda (x) (ssadd x enlst)) ss))
    )
    ((='ename(type ss))
      (ssadd ss)
    )
)
)
;(entget(car(entsel))'("*"))

(defunc:plind1 (/temp temp1lst y )
;(vla-get-Type(vlax-ename->vla-object (car (entsel "\n选择多段线:"))) )
(vl-cmdf "CONVERTPOLY" "h" (ssget "x" '( (0 . "lwpolyline,polyline")(8 . "dgx")   )) "" )

(initget 1 "D S F 3S")    (setq temp (getkword "(D)不拟合/(S)2次样条拟合/(3S)3次样条拟合/(F)圆弧拟合] <F>"))

(setq lst (ssget '( (0 . "polyline")(8 . "dgx")   )))


;(vla-put-Type (vlax-ename->vla-object (car (entsel "\n选择多段线:")))3)(vla-Update leaderObj)

(foreach y(cx-ss2en lst)


(cond

    ((= temp "D") (setq temp1 (vlax-ename->vla-object y))(vla-put-Type temp10) (vla-Update temp1 )   )

    ((= temp "F") (setq temp1 (vlax-ename->vla-object y))(vla-put-Type temp11) (vla-Update temp1 ))

    ((= temp "S") (setq temp1 (vlax-ename->vla-object y))(vla-put-Type temp12) (vla-Update temp1 ))

    ((= temp "3S") (setq temp1 (vlax-ename->vla-object y))(vla-put-Type temp13) (vla-Update temp1 ))

)

)
(princ)
)
页: [1]
查看完整版本: 这是模仿CASS等高线拟合命令PLIND吗?