找回密码
 注册
关于网站域名变更的通知
查看: 874|回复: 3
打印 上一主题 下一主题

cline转shape

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-3-21 19:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

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

x
axlCmdRegister("c2s" 'LCB_cline_to_shape ?cmdType "interactive"
?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel)

procedure(LCB_cline_to_shape()
let( ()
axlSetFindFilter(?enabled list("noall" "clines" "lines" )
                  ?onButtons list("noall" "clines" "lines"))
LCBpopup = axlUIPopupDefine( nil (list
    (list "Undo" 'LCB_unDo)
    (list "Done" 'LCB_Done)
    (list "Cancel" 'LCB_Cancel)
     ))
axlUIPopupSet(LCBpopup)

LCB_mark = axlDBTransactionStart()
notdone = t
while(notdone
  lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
  println(lclines)
  if(lclines then
    foreach(clinedbid lclines
      ;layer = "etch/bottom"
      layer = car(axlGetSelSet())->layer
          println(layer)
       polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
           println(polydbid)
       if(polydbid then
        axlDeleteObject(clinedbid)
        if(! axlDBCreateShape(car(polydbid) t layer)  then
          axlUIWPrint(nil "** Error. Failed to create Shape from Cline. **")
        ); endif
        if(cadr(polydbid) then
            axlDBCreateShape(cadr(polydbid) t layer)  )
       else
        axlUIWPrint(nil "** Error. Failed to create Polydbid from Cline. **")
       ); endif
    ); end foreach cline
  ); endif
); end while
axlDBTransactionCommit(LCB_mark)

)); let and procedure

procedure(LCB_unDo()
let( ()
  if(! axlDBTransactionOops(LCB_mark) then
    axlUIWPrint(nil "-- Nothing Left To Undo. --")
  else
    axlUIWPrint(nil "-- Replacing Clines. --")
  ); endif
  axlClearSelSet()
)); end let procedure

procedure(LCB_Cancel()
let( ()
  axlUIWPrint(nil "** Cancelled Program. **")
  ;axlDBTransactionRollback(LCB_mark)
  notdone = nil
  axlClearSelSet()
  axlCancelEnteRFun()

)); end let procedure

procedure(LCB_Done()
let( ()
  axlUIWPrint(nil "- Done -")
  axlDBTransactionCommit(LCB_mark)
  notdone = nil
  axlCancelEnterFun()

)); end let and procedure

  • TA的每日心情
    奋斗
    2020-3-27 15:39
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2020-3-27 16:34 | 只看该作者
    感谢分享,很好用!:victory::victory:

    该用户从未签到

    3#
    发表于 2020-4-16 10:37 | 只看该作者
    赞一个,非常好用

    该用户从未签到

    4#
    发表于 2020-8-25 10:31 | 只看该作者
    这个怎么用
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-6-7 13:11 , Processed in 0.062500 second(s), 23 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

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