论坛没搜到,自己查找了一些资料,记录如下
(vla-put-MLineScale vla对象 多线比例值)
示例:单线转多线
- (defun hg_linetomline(/ clst ww en curve kword enlst)
- (setq clst(HG::CURVE::toPoints (setq curve(car(entsel"选择直线或多段线")))))
- (if hglinetomlinedata
- (setq ww(getreal(strcat"输入多线宽度<"(rtos hglinetomlinedata 2)">")))
- (progn
- (setq hglinetomlinedata 20)
- (setq ww(getreal(strcat"输入多线宽度<"(rtos hglinetomlinedata 2)">")))
- )
- )
- (if(null ww)(setq ww hglinetomlinedata)(setq hglinetomlinedata ww))
- (if(= (car clst) "AcDbLine")
- (setq en(HG::PNTS::TOMLINE(cdr clst)))
- (setq en(HG::PNTS::TOMLINE(nth 1 clst)))
- )
- (vla-put-MLineScale (vlax-ename->vla-object en) ww)
- (setq kword(getstring "是否保留原有直线或多段线(Y/N)<N>"))
- (if (or (= kword "N")(= kword "n")(= kword ""))
- (entdel curve)
- )
- (princ)
- )
|