找回密码
 注册
查看: 1790|回复: 2
打印 上一主题 下一主题

cline转出shape均在bottom层,求大神修正让生成shape在当前cline所在层

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2014-9-30 11:12 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

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

x
以下是一段cline转shape的代码,不足的是不管被转的cline在哪一层面,转出shape均在bottom层,那位大神帮忙更新一下,
我的想法是,在选择 被转的cline时,同时也读取当前层面,存入变量layer。初学都啥都不会!

/*
################################################################################
#                                                                              #
#                      Command: cline2shape                                    #
#                   skill File: cline2shape.il                                 #
#                  How To Load: Command> (load("cline2shape.il"))              #
#               How To Execute: Command> cline2shape                           #
#                Creation Date: 07/15/2003                                     #
#                                                                              #
################################################################################
################################################################################
#  DISCLAIMER:                                                                 #
#       The user of this command assumes all responsibility and does not       #
#       hold cadence Design Systems nor the author of this code for any        #
#       unwarranted results or problems due to the use of this code.           #
#                                                                              #
#       This is non-supported code and the user may modify it as needed.       #
#                                                                              #
################################################################################
################################################################################
#  Know Bug: Sometimes the program will not convert all cline segments but it  #
#            will DELETE all segments.  Use at your OWN discretion!            #
#            Select Cancel or Undo before exiting the command to restore       #                                                                              #
#            to original Clines.                                               #
#                                                                              #
################################################################################
*/

axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel)
procedure(LCB_cline_to_shape()
let( ()
axlSetFindFilter(?enabled list("noall" "clines")
                  ?onButtons list("noall" "clines"))
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."))
  if(lclines then
    foreach(clinedbid lclines
      layer = "etch/bottom"
       polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
       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

该用户从未签到

2#
发表于 2014-10-1 13:34 | 只看该作者
你只要將這一行 layer = "etch/bottom"
改為這樣就可以 layer = clinedbid->layer

该用户从未签到

3#
 楼主| 发表于 2014-10-1 14:28 | 只看该作者
如此如此的简单,skill要如何入门呀,谁传5年功力给我,哈
您需要登录后才可以回帖 登录 | 注册

本版积分规则

EDA365公众号

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

GMT+8, 2024-9-20 06:33 , Processed in 0.109375 second(s), 22 queries , Gzip On.

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

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

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