明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 501|回复: 1

[经验] 多线MLINE修改多线比例

[复制链接]
发表于 2023-5-15 15:17 | 显示全部楼层 |阅读模式
论坛没搜到,自己查找了一些资料,记录如下

(vla-put-MLineScale vla对象  多线比例值)

示例:单线转多线
  1. (defun hg_linetomline(/ clst ww en curve kword enlst)
  2.   (setq clst(HG::CURVE::toPoints (setq curve(car(entsel"选择直线或多段线")))))
  3.   (if hglinetomlinedata
  4.     (setq ww(getreal(strcat"输入多线宽度<"(rtos hglinetomlinedata 2)">")))
  5.     (progn
  6.       (setq hglinetomlinedata 20)
  7.       (setq ww(getreal(strcat"输入多线宽度<"(rtos hglinetomlinedata 2)">")))
  8.     )
  9.     )
  10.   (if(null ww)(setq ww hglinetomlinedata)(setq hglinetomlinedata ww))
  11.   (if(= (car clst) "AcDbLine")
  12.     (setq en(HG::PNTS::TOMLINE(cdr clst)))
  13.     (setq en(HG::PNTS::TOMLINE(nth 1 clst)))
  14.     )
  15.   (vla-put-MLineScale (vlax-ename->vla-object en) ww)
  16.   (setq kword(getstring "是否保留原有直线或多段线(Y/N)<N>"))
  17.   (if (or (= kword "N")(= kword "n")(= kword ""))
  18.      (entdel curve)
  19.     )
  20.   (princ)
  21.   )


发表于 2023-5-18 09:44 | 显示全部楼层
能有完整的程序吗
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-8 21:35 , Processed in 0.557358 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表