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

有没有cline to shape的skill,帮忙分享一个。谢谢。

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2019-1-2 15:39 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑 + u$ f1 |7 P1 }. n. R
. q3 D. @; b. S% _) ]8 T, I' ]1 H  ?
有没有cline to shape的skill,帮忙分享一个。谢谢。
* Q& z! t% v2 o) E! A! N" t) O, V3 ]我在论坛上找到的,运行命令后,会出现:
$ r2 _7 Y( D2 E  |! PW- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed3 |" j2 Q5 }; f/ \  J9 W

5 V! v  y) S. A
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。1 W+ v# Y3 M/ u. k

    点评

    学习了  详情 回复 发表于 2019-1-4 10:00
  • TA的每日心情
    慵懒
    2025-6-26 15:13
  • 签到天数: 82 天

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    7 j$ C8 y' E0 d
    * ?2 U# W0 `- f8 e  i
    1. ;###############################################################################4 U4 d5 N" h/ V
    2. ;                                                                              #
      ( l' D& k: S; l7 l1 M& A) [2 t- s
    3. ;                      Command: cline2shape                                    #
      ( S, E7 f! o$ \) g
    4. ;                   Skill File: cline2shape.il                                 #
      % |% R* n6 k- h' N" c4 r
    5. ;               How To Execute: Command> cline2shape                           #
      ! {- v# C, E7 U& c! C  V
    6. ;                                                                              #
      % g" u+ c; l! W# p) D
    7. ;  DISCLAIMER:                                                                 #
      2 M' r; G) w6 {% w, n
    8. ;       The user of this command assumes all responsibility and does not       #
      / W/ h, x% h8 E- J
    9. ;       hold Cadence Design Systems nor the author of this code for any        #
      . n+ E% Q9 y- V) V+ \& Y
    10. ;       unwarranted results or problems due to the use of this code.           #
      & k" r8 G  \5 o9 d. H! D# j, C
    11. ;                                                                              #
      ( Y" b+ \' Z* Q4 g4 J/ H7 g
    12. ;       This is non-supported code and the user may modify it as needed.       #5 u: T& K' C- `# Z9 P: n% v
    13. ;                                                                              #
      . h+ o8 k; c+ u4 Q7 x- i
    14. ;###############################################################################
      / u" p# C, E( }) Y: P; Q

    15. ! `% Z, o- ?0 U
    16. ; demostrates
      # |, E2 ^. l1 b! u! a8 g
    17. ;        1) style for an interactive command
      ' s# Y, i# s% F: Z9 a
    18. ;        2) use of the database tranasction APIs$ a! E* ?& O9 r- Y& k' C
    19. ;        3) two styles of undo/redo support6 ]2 Z" M0 M  E2 `
    20. ; Added undo support- y& [, {' F/ K
    21. 8 a1 X6 p7 C5 s8 W1 G$ P
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it $ T* j' G6 I* N+ u+ z4 R" `5 e
    23. ;            will DELETE all segments.  Use at your OWN discretion!6 Q/ q( }+ P) {# ?  H' E' J: ^
    24. ;            Select Cancel or Undo before exiting the command to restore  
      # b! ]% A6 Q9 s$ W7 ]
    25. ;            to original Clines.
      5 o. w! `$ v. J$ c) J& K0 ]) l$ `% n9 ]
    26. 5 T- g. h, ]4 I5 f9 T

    27. , r1 l+ K8 Q& t" q# h* |! \) o

    28. 0 W% n7 O' K% h% C0 ]
    29. 8 X) ^: O1 o" l4 d
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
      ! {9 X5 H3 @7 }9 x! s3 c. A# G9 P
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)5 W6 G$ ]9 d9 M/ w4 H
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"
      " T3 n% c" W6 Z, W- Q
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t): C# L4 e! Q$ a6 ^

    34. 8 p8 v% c, H. }/ L
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      - v9 v. X; e" u
    36. ; This shows undo where all of the conversions that this user does while
      % A: i% s8 `7 P" d( ]
    37. ; in the command a undone as a single operation.
      5 d4 j& R0 j" ~4 |& O
    38. ;        To convert an existing command to support undo this method is) p7 {# p, u; N; V
    39. ;        typically easier.
      1 x* \6 u% U) q6 s' t' x, W
    40. ' h& _2 N6 y$ I; l* h4 j0 h" d  w
    41. procedure(LCB_cline_to_shape()9 t3 C: l9 b1 \6 b$ W: J8 e
    42. let( (lclines layer polydbid )) t! \0 W0 Z) b) z! C, h# ^7 s

    43. % R" t+ l& A+ A# k5 T
    44.   LCB_Setup()% P. z/ u4 k9 _, Q" ~; R, @

    45. ( h$ I8 ^9 y+ s
    46.   ; cannot have a global transaction if we want undo to roll back each operation
      # z* b) Y" P3 W) K" N
    47.   LCB_mark = axlDBTransactionStart()
      . d9 ~2 ^8 N7 ^+ \4 r4 Q' p* A

    48. ! f5 S3 u; K& h: d* t$ \
    49.   LCBnotDone = t
      % g" p2 j7 ^3 r
    50.   while( LCBnotDone
      8 m8 W( ?2 V4 h% G# g8 K" Z# ?, T+ t# J% W
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))# i2 Y5 d, U1 I# h, z0 I

    52. 2 i* N. T8 I. [8 [: h
    53.       foreach( clinedbid lclines5 F% ^& k0 |* Y: P% F8 P; r7 P
    54.             layer = clinedbid->layer6 C' {6 z1 [' h' ?
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")$ g, O* n0 n. J8 G3 @
    56. ( j! T- J6 `' N) C
    57.             axlDeleteObject(clinedbid)
      & d) @! i* F- }9 b" \
    58.   J; Y( g6 }- |( f2 Z
    59.             unless( axlDBCreateShape(car(polydbid) t layer)  
      ( q: G4 H5 f! l6 a; D4 S; G
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      $ M+ p1 p# N  P+ Z% E
    61.             )8 l* L- `3 _/ z" J( n
    62.             when( cadr(polydbid)   o' h# V* ~# ^3 `
    63.                 axlDBCreateShape(cadr(polydbid) t layer)
        s, }& r9 X+ q0 R7 m: l3 ]
    64.             )
      ! p7 C5 V# B, a7 Q8 |# y# N* k
    65.      )
      $ \9 Z3 ?  e7 n
    66. * x7 n8 q1 u. y) C
    67.      ; marks are only required if undo is using rolling back all database changes- V7 }$ s7 B: Z
    68.      ; when command is active. When undoing each conversion this is not needed
      , n( g5 n3 l* @* @4 B0 Y6 n* d
    69.      ; nor is Oops functional.# z1 j8 j8 f9 I* r5 ]8 q+ @
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))' `) H6 J/ b- F  e3 C
    71.   )- i  j4 c0 g+ w  m& Z
    72.   ;LCB_Done() ; just in case
      4 _  N7 c2 J, s8 k) i# S2 |
    73. ))
      8 q* `7 e# w" |4 o. H0 {
    74. " z6 c; k# r" N  O7 s' b
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4 z' J1 }& B3 j9 R0 m" |
    76. ; This shows undo where each conversion is supported as seperate undo operation
      ( b  F( b5 o! y& g% S
    77. ; in the command a undone as a single operation.. {6 j7 a8 a/ d; T+ w0 E/ e
    78. ;        To convert an existing command to support undo this method is
      6 G" N- S# h' j
    79. ;        typically easier.* Q9 e9 {4 ]+ _& k$ Q3 V' ~) H

    80. * I$ \$ d4 C! }! N
    81. procedure(LCB_cline_to_shape2()# B# n. P/ `0 C
    82. let( (lclines layer polydbid doMark )9 `5 k4 F9 _3 T* ]
    83. / l% V2 E- R$ v, O
    84.   LCB_Setup()5 ]' H& e1 r5 ?' p

    85. + o2 q# R$ L1 }0 n5 y; S" E
    86.   ; cannot have a global transaction if we want undo to roll back each operation! ^, x5 I$ a) j+ f  ~

    87. - Q9 n* z' W# j
    88.   LCBnotDone = t# i' b, y8 ^3 @
    89.   doMark = 'undoMark% R, F  `; ?; K, F% ]9 p

    90. 3 [7 `4 P( c  T' c4 u, g# A
    91.   while(LCBnotDone
      % \5 \4 q% E/ @' a. g6 r& ^
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
      " Q0 F* l' d& p! n5 l, g
    93. + a2 N% v: M! P6 l0 e
    94.       ; need to do a start/commit for each operation if we want undo to
      ! c7 x# ~1 y. |  b5 {' ~8 G# x+ Q
    95.       ; rollback each change. This mostly disables Oops
      7 _( N; z; y' V$ X% d" {3 J
    96.       ;          don't want to start a transaction unless we have work to do or it will; r9 p( q3 a& A: L3 }5 K3 }
    97.       ;   do a unneeded undoMark. % x) J9 y+ d; O1 V
    98.       when(lclines $ j( _- n& b+ C4 T: {8 T: u
    99.           LCB_mark = axlDBTransactionStart(doMark)
      + y6 u, n: R" Q  C
    100.       )0 E+ U- O) c6 u' l& x8 u: V1 ]! x2 k
    101. 9 J* ^7 y8 _% Q7 I7 m- d
    102.       foreach( clinedbid lclines8 m& i. b* l, b6 P4 m+ q0 t
    103.             layer = clinedbid->layer
      # r5 M. U, e) U( `
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")3 W! `; B( A$ q8 Q4 e

    105. ; q4 g+ S$ z& F/ \
    106.             axlDeleteObject(clinedbid)
      2 `# @! n' E1 e' a

    107. # W2 ~/ C( _3 ?
    108.             unless( axlDBCreateShape(car(polydbid) t layer) " f1 W8 Q1 n$ X0 H4 r: v8 y
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline."): I4 s- f  U4 h2 u9 i
    110.             )3 l* S/ q' [& ^3 g  f
    111.             when( cadr(polydbid)
      ( T3 a+ E( r6 _7 `+ u
    112.                 axlDBCreateShape(cadr(polydbid) t layer) - o; y. u& n( I& P% q) T
    113.             )3 t  o% J$ s5 I0 J0 d
    114.      ), q  F% w0 S9 ^4 I% A: S* h  ^5 P

    115. 1 M2 d6 u3 s& z& l, X
    116.      ; marks are only required if undo is using rolling back all database changes
      6 m  {8 V# E/ u; T+ k
    117.      ; when command is active. When undoing each conversion this is not needed; S- G$ {: b9 F9 D
    118.      ; nor is Oops functional.
      % |) D+ z7 @. Z/ y9 {
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))
      8 a' r0 i+ K' n8 a& k
    120.      LCB_mark = nil
      4 H. K9 J5 O8 o5 i% c; W3 J
    121.   )
      % B, |! \4 G$ ~' P& ^' s
    122.   LCB_Done() ; just in case
      3 n, W& A; W) ^' i
    123. ))! r6 f# @# U& T+ g! k1 k
    124. $ q1 C' h& s4 A& ^, \1 T( [
    125. 4 ^& [1 N- J: ?, f9 B
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      & g; q* B7 ~, P) o0 u$ Q
    127. ;; support APIs* z$ |  s( |3 A4 H- U' R

    128. , [* B1 s" G% k* ^* n# j5 X9 h
    129. procedure(LCB_Setup()+ m* e: Y" |2 j. h( z
    130. let( (popup)  W1 _* V9 s& @! o2 ~
    131.   axlSetFindFilter(?enabled list("noall" "clines")
      7 {- ?" Z; l3 i  O
    132.                   ?onButtons list("noall" "clines"))) O$ n! ]* D8 e. t
    133. 6 b& S% {( F1 l) o
    134.   popup = axlUIPopupDefine( nil (list, [% N* u* p4 ~# A4 c7 }  v1 h! h0 O
    135.     (list "Done" 'LCB_Done)
      2 i, T4 z3 `$ x5 o. p7 a2 e
    136.     (list "Oop" 'LCB_Oops)
      5 l3 P3 {1 Q" W0 H! g. w
    137.     (list "Cancel" 'LCB_Cancel)0 C) k) h. V2 u1 @! w4 s; M& _
    138.      ))
      , a2 A/ ~. R, g9 I7 }. V5 j; d
    139. 7 `. T- f7 `2 U- P' r: @( F7 p
    140.   ; Snapping is not required by this command but this shows the ability
      % H6 Y5 v" x+ n/ |+ U! L0 l0 w$ H- m
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu0 r1 \5 Q2 a# `1 `0 o* v0 O
    142.   axlSnapEnableAtRMB()9 W* z" P. n9 S- ?# h+ ]; O

    143. 8 f" A# [2 A& l4 i8 k& M4 T
    144.   axlUIPopupSet(popup)' {/ ?. ]$ h( W/ L
    145.   LCB_mark = nil- s8 i% @. i8 G! W- Y* Y& \
    146. ))
      * f- d6 g7 t* i. p& A( K& _

    147. - b% N: U' v$ T
    148. procedure(LCB_Oops()
      " L! p3 }/ }, ^9 H2 G% X6 H4 y
    149.   when(LCB_mark
      / A+ G2 r; D( ?- H& E
    150.     if(! axlDBTransactionOops(LCB_mark) then
      / ~* C; Y3 ~2 B4 G5 c6 V
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --")* H( ~* ^. T! s  A; W9 @( }
    152.     else% E& p, X7 o, F( ~+ w
    153.       axlUIWPrint(nil "-- Replacing Clines. --")
      " t3 N$ ?5 D; x9 Z; n
    154.     )
      & g* M2 p. r; y
    155.   )
      2 f, k& R: U5 w  V0 Z6 [% V
    156.   axlClearSelSet()/ B" a. G2 y" |/ [9 N' |
    157. )1 Y) d# c8 X/ t* E( }1 f5 ?8 T; {
    158. 2 b) y  v- D8 m# i/ A$ E
    159. procedure(LCB_Cancel()
      . i! ^0 w1 Z, @- |
    160.   axlUIWPrint(nil "** Cancelled Program. **")0 U$ X" Y+ X* @  O4 W* m7 X
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark))
      & e1 P2 F6 `4 k) a
    162.   ;LCB_mark = nil
      # m5 m$ ^; x+ M3 V- d
    163.   LCBnotDone = nil( q. A4 _& F* w. w
    164.   axlClearSelSet()$ b) ~1 M/ t" }0 _/ e
    165.   axlCancelEnterFun()
      % y6 c" s* |, F# m- V
    166. )3 g' H3 h& c  z
    167. / H# |" F% l; G  a9 i) m

    168. + C& E* ]! V+ o* k/ t
    169. procedure(LCB_Done()  u  R4 i; V7 i: [  E
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark)); G5 P! f2 P; l; I: j
    171.   ;LCB_mark = nil
      ( T# n4 s% d1 q) C  q8 u; ^, o/ X
    172.   LCBnotDone = nil
      - d* j% c: t( p: Y7 M3 E
    173.   axlFinishEnterFun()) H+ R/ Q( k1 e" ]2 e% i
    174. )
      7 j( s9 x3 z* y- x$ F. p0 T
    复制代码

    点评

    删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)  详情 回复 发表于 2023-6-5 16:00
  • TA的每日心情
    奋斗
    2025-4-30 15:20
  • 签到天数: 123 天

    [LV.7]常住居民III

    推荐
    发表于 2023-6-5 16:00 | 只看该作者
    db-_- 发表于 2022-2-18 11:54
    : L- H9 z3 p8 @16.x及之前的版本需要把出现的两个“?undo t"删掉。

    . E1 j  n7 ~' u- |& U4 g' b9 D# H删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)
    # X! S/ |/ v# A2 X" _2 p4 c! j

    该用户从未签到

    3#
    发表于 2019-1-2 19:17 | 只看该作者
    看一下,学一下
  • TA的每日心情
    开心
    2020-9-9 15:52
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    4#
    发表于 2019-1-4 10:00 | 只看该作者
    dzkcool 发表于 2019-1-2 15:50' a, f+ L: ^$ U; R
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    , A  V8 l$ ^4 g% u) `
    学习了
    5 N5 J3 Y$ |: H5 i5 W( _7 m5 [' y6 `3 l

    点评

    请问16.6有这个功能吗  详情 回复 发表于 2019-1-4 10:14

    该用户从未签到

    5#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:00; `5 C" `" a( U6 `/ V  @4 s
    学习了

    # Q  v+ ]" z5 s, F7 \' V请问16.6有这个功能吗
    7 W; B  E! \" \3 K

    点评

    新版本有,我用的17.2  详情 回复 发表于 2019-1-4 14:25
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    6#
    发表于 2019-1-4 10:16 | 只看该作者
    从16.6开始就有了

    点评

    是不是需要再打个补丁?  详情 回复 发表于 2019-1-9 17:37
    我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!  详情 回复 发表于 2019-1-9 17:32

    该用户从未签到

    7#
    发表于 2019-1-4 11:21 | 只看该作者
    allegro productivity toolbox

    点评

    請問是在哪裡呢? 我的沒瞧見  详情 回复 发表于 2019-1-8 18:51

    该用户从未签到

    8#
    发表于 2019-1-4 11:57 | 只看该作者
    corss copy确实很好用,还可以直接将pad copy成shape,对于挖空来说很方便。
  • TA的每日心情
    开心
    2020-9-9 15:52
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    9#
    发表于 2019-1-4 14:25 | 只看该作者
    lavidayao 发表于 2019-1-4 10:146 d! {1 P6 |  P: q+ h) q2 \
    请问16.6有这个功能吗
    # ]( W. F$ V$ `1 ^8 r5 l
    新版本有,我用的17.2+ F' |& r9 p; D" ^: j9 @# Q

    该用户从未签到

    10#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来
    ( ~% h' n( ^3 {

    该用户从未签到

    11#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21
    & v7 u; S1 K2 C4 r' a, i4 v: tallegro productivity toolbox
    4 S9 S) A) [8 E& \9 s
    請問是在哪裡呢? 我的沒瞧見
    + o+ T4 |, W" k: T; _  e

    该用户从未签到

    12#
    发表于 2019-1-9 10:16 | 只看该作者
    16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾选lines然后框选你的闭合线框就会生成你设定的shape。注意线框一定要闭合的

    点评

    这个15.X版本就已经有了的。不过还是感谢回答。  详情 回复 发表于 2019-1-9 17:31

    该用户从未签到

    13#
     楼主| 发表于 2019-1-9 17:31 | 只看该作者
    何文斌 发表于 2019-1-9 10:16$ i, W% `5 Z0 Z3 G1 O: r$ Y4 Z
    16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...

    , Z6 Y; R# M- _! g- s这个15.X版本就已经有了的。不过还是感谢回答。
    0 E: ?+ S; ]. L  W, \0 {0 I

    该用户从未签到

    14#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:164 w, k$ \4 y3 K: o. h
    从16.6开始就有了

    & I& m* ^9 @0 q5 X, X% N; k# v- }我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!) Y) X4 P/ v3 k( M4 R

    该用户从未签到

    15#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16" k: S+ U) `; G- N) A0 O( b0 \
    从16.6开始就有了

    5 v5 M2 M1 H' P, |! N# b4 a1 Q! f是不是需要再打个补丁?4 |- p7 a* @" }: P$ E( L

    product.png (25.32 KB, 下载次数: 0)

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-6-27 19:48 , Processed in 0.125000 second(s), 38 queries , Gzip On.

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

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

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