明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1176|回复: 5

[提问] 新建图层问题

[复制链接]
发表于 2016-10-26 20:48 | 显示全部楼层 |阅读模式
哪个位高手能帮我把这个插件加一语名,把它放到“外框”这个图层,并将颜色变为粉红色。可以新建一个图层。如图
(defun c:vv ()
   (xdrx_prompt "\n选取生成外框的实体<退出>:")
  (if (setq ss (ssget))
    (progn
(if (not (setq dis (getreal "\n输入板边30<0>:")))
    (setq dis 30)
  )
      (setq box (xdrx_entity_box ss))
      (if (> dis 0)
        (setq box (xdrx_points_offset (abs dis) (xd::pnts:close box)))
      )
      (command "explode" (xdrx_polyline_make box t))
    )
  )
  (princ)
)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2016-10-29 19:59 | 显示全部楼层
试一下吧:
(defun c:vv ()
   (xdrx_prompt "\n选取生成外框的实体<退出>:")
  (if (setq ss (ssget))
    (progn
(if (not (setq dis (getreal "\n输入板边30<0>:")))
    (setq dis 30)
  )
      (setq box (xdrx_entity_box ss))
      (if (> dis 0)
        (setq box (xdrx_points_offset (abs dis) (xd::pnts:close box)))
      )
      (command "explode" (xdrx_polyline_make box t))
    )
  )
  
(if (= (tblsearch "Layer" "板边框") nil)
(command "Layer" "new" "板边框" "color" "6" "板边框" ""))
(command "chprop" (entlast) "" "p" "la" "板边框" "")
  (princ)
)
 楼主| 发表于 2016-11-1 18:38 | 显示全部楼层
669423907 发表于 2016-10-31 22:50
(defun c:vv ()
   (xdrx_prompt "\n选取生成外框的实体:")
  (if (setq ss (ssget))

谢谢你的帮助,问题解决了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 23:05 , Processed in 0.367973 second(s), 30 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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