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

大量铜皮指定属性操作

[复制链接]
  • TA的每日心情
    开心
    2025-2-28 15:37
  • 签到天数: 79 天

    [LV.6]常住居民II

    跳转到指定楼层
    1#
    发表于 2023-4-4 10:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

    EDA365欢迎您登录!

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

    x
    求大神来个大量相同模块铜皮属性指定的快捷方法,或者求大神告知下此类skill怎么写?

    点评

    主要在於使用習慣, 先指定就沒這問題. 若至於一定要指定, 就跟 change via net 一樣, 先指定NET (分 點選物件net 或 全NET選單), 再選定SHAPE (分 立即轉換 或 確定後一齊轉換.), 就看個人工作習慣 和 工作SOP.  发表于 2023-4-4 18:31
  • TA的每日心情
    开心
    2023-6-1 15:13
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2023-4-4 11:07 | 只看该作者
    我每次都是慢慢的改,但是你这个需求能提高工作效率,
    看看大神一会回复,坐等大神出现
  • TA的每日心情
    开心
    2025-2-28 15:37
  • 签到天数: 79 天

    [LV.6]常住居民II

    3#
     楼主| 发表于 2023-4-11 10:58 | 只看该作者
    几个的话是没必要,一个个画和指定,先后指定铜皮属性都是可以的,我说的是大量的。几十个相同模块的,画好一个,其他复制过去,得一个一个指定,VENSEN skill之前用是可以,但是后来收费了,所以香求大神给个快捷的SKILL或者告知下怎么编写代码的

    点评

    官方Skill示例中有类似的功能代码:\share\pcb\examples\skill\cmds\changeNetsOnManyShapes.il  详情 回复 发表于 2023-5-8 10:27

    该用户从未签到

    4#
    发表于 2023-5-8 10:27 | 只看该作者
    abu1987 发表于 2023-4-11 10:58
    几个的话是没必要,一个个画和指定,先后指定铜皮属性都是可以的,我说的是大量的。几十个相同模块的,画好 ...

    官方Skill示例中有类似的功能代码:\share\pcb\examples\skill\cmds\changeNetsOnManyShapes.il
    1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    2. ;
    3. ; Author --
    4. ;        Cadence Design Systems
    5. ;
    6. ; Function --
    7. ;       
    8. ; Copyright, 2003, Cadence Design Systems, Inc.
    9. ; No part of this file may be reproduced, stored in a retrieval system,
    10. ; or transmitted in any form or by any means --- electronic, mechanical,
    11. ; photocopying, recording, or otherwise --- without prior written permission
    12. ; of Cadence Design Systems, Inc.
    13. ;
    14. ; WARRANTY:
    15. ; NONE. NONE. NONE.
    16. ; Use all material in this code at your own risk.  Cadence Design Systems
    17. ; makes no claims about any material in this archive.  These examples may
    18. ; not function or may only function in specific instances. We'd like to hear
    19. ; what you think of our approach to this, and how we can improve it.
    20. ;
    21. ; RESTRICTIONS:
    22. ; All software contained within this archive is in the public domain or
    23. ; the author has given us permission for redistribution.  Some packages
    24. ; have explicit copyrights and notices concerning their redistribution.
    25. ; Please carefully read all documentation with any package on this tape.
    26. ;
    27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    28. ; This allows a user to assign/change nets assign to one or more
    29. ; shapes. Command started user is prompted to pick one or more
    30. ; shapes (e.g. pick or by window). User is then presented with a net
    31. ; browser to select net.

    32. ; Examples of axl function use (for more info on individual functions
    33. ;        see the documentation)
    34. ;
    35. ; This demostrates writing a simple interactive Allegro command that
    36. ;
    37. ;   axlSetFindFilter: Prompt user to find elements
    38. ;   axlControlRaise: raise a panel in options
    39. ;   axlUIPopupSet: define your own popup
    40. ;
    41. ;   axlDBTransaction<XXX>:  database transactions (conditional database changes)
    42. ;   axlDBCloak: Improve performance when making multiple etch/logic changes
    43. ;
    44. ;   axlChangeNet: change the net associated with a database object
    45. ;   
    46. ;

    47. _ashChangeNetFinish = nil

    48. (defun ashChangeShapeNets ()
    49.     (let (oldPopup procFunc)
    50.         oldPopup = axlUIPopupSet(axlUIPopupDefine(nil
    51.                                 '(("Cancel" _ashChangeNetCancel)
    52.                                   ("Done" _ashChangeNetDone))))

    53.         procFunc = '_ashChangeNetsListCloak
    54.         axlControlRaise('find)
    55.         axlSetFindFilter(?enabled '("NOALL" "SHAPES" )
    56.                          ?onButtons '("SHAPES"))
    57.         mark = axlDBTransactionStart()
    58.         while( axlSelect(?prompt "Select shapes(s) to change nets")
    59.              apply(procFunc list(axlGetSelSet()))
    60.         )

    61.         if( _ashChangeNetFinish then
    62.             axlDBTransactionCommit(mark)
    63.         else
    64.             axlUIWPrint(nil 'warn "Canceled.\n")
    65.             axlDBTransactionRollback(mark)
    66.         )
    67.         axlUIPopupSet(oldPopup)
    68.         nil
    69. ))

    70. (defun _ashChangeNetsListCloak (shapes)
    71.     (let (net )

    72.     axlDBCloak( '_ashChangeNetsList(shapes) ))
    73. )

    74. (defun _ashChangeNetsList (shapes)
    75.     (let (net )

    76.     net = axlUIDataBrowse('NET '(RETRIEVE_OBJECT) "Select Net" t)
    77.     when(net
    78.         axlUIWPrint(nil 'info0 "Changing shapes to net %s...\n" car(net))
    79.         net = cadr(net)
    80.         foreach(item shapes
    81.             ; only change shapes already with a net
    82.             when(item->net
    83.                 axlChangeNet(item net))
    84.         )
    85.         axlUIWPrint(nil 'info0 "Completed.\n")
    86.     )
    87. ))

    88. (defun _ashChangeNetCancel ()
    89.         axlCancelEnterFun()
    90.         _ashChangeNetFinish = nil
    91. )

    92. (defun _ashChangeNetDone ()
    93.         axlFinishEnterFun()
    94.         _ashChangeNetFinish = t
    95. )


    96. axlCmdRegister("changeshapenet" 'ashChangeShapeNets
    97.                         ?cmdType "interactive"
    98.                         ?doneCmd '_ashChangeNetDone
    99.                         ?cancelCmd '_ashChangeNetCancel)
    复制代码




    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-7-19 19:57 , Processed in 0.109375 second(s), 24 queries , Gzip On.

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

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

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