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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑 " F! y- [* T1 R2 i& P4 K
" m8 Y1 Z- a  W* J8 `9 D4 M
有没有cline to shape的skill,帮忙分享一个。谢谢。% q/ z0 s, U! Z& A- @0 H; j4 w
我在论坛上找到的,运行命令后,会出现:: O8 U0 q1 K* A# T  j$ A1 M
W- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed
3 J* w0 r8 y- H5 g1 }' M+ d- [$ ^( c% ^) t
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    6 W3 ]! I8 n  D6 D2 g1 D1 h/ j

    点评

    学习了  详情 回复 发表于 2019-1-4 10:00
  • TA的每日心情
    奋斗
    2025-4-27 15:26
  • 签到天数: 81 天

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。/ @8 f/ @4 a- ]4 R# n

    ; o1 r& P, }  A6 P7 x
    1. ;###############################################################################+ O* |1 R. J+ n1 c/ X" `( `" h
    2. ;                                                                              #6 G: O  T( j) Y. {+ S
    3. ;                      Command: cline2shape                                    #
      & {. `4 z: g& C6 T0 e1 Z+ S# L8 c
    4. ;                   Skill File: cline2shape.il                                 #
      $ f7 v( a0 E% @" b* A, @  Z
    5. ;               How To Execute: Command> cline2shape                           #
      - M; G6 V# n, P; P2 x1 e
    6. ;                                                                              #
      ( \3 _. j% \( Y" _
    7. ;  DISCLAIMER:                                                                 #
      / p3 A9 k. H& T) T, t& `3 J
    8. ;       The user of this command assumes all responsibility and does not       #
      * l, d, a% b7 {- ?* P! r! Y
    9. ;       hold Cadence Design Systems nor the author of this code for any        #
      1 W  }% @* N  X2 n4 I- g# v: ]
    10. ;       unwarranted results or problems due to the use of this code.           #
      2 \( ?, [- h' |1 }0 c0 \$ m
    11. ;                                                                              #
      " F9 ^! G4 r( {+ ~* W
    12. ;       This is non-supported code and the user may modify it as needed.       #: p3 a# {$ }; ]0 d6 s
    13. ;                                                                              #. O1 x6 Z2 a7 ^3 k4 j) W  U
    14. ;###############################################################################
      ) g2 ^; L/ m$ x" a/ W

    15. - m; m  {8 ~! f, C
    16. ; demostrates. I" H2 \; G6 g: f/ Z& ^6 j: \
    17. ;        1) style for an interactive command& _5 k9 H- m/ H+ E# j$ E5 {
    18. ;        2) use of the database tranasction APIs
      - @* g& _7 y2 [2 z9 a1 S! k2 k
    19. ;        3) two styles of undo/redo support$ w4 k- k+ m) b8 t
    20. ; Added undo support: w3 q* o( Z6 h! ~4 R

    21. ) l* V  b, P7 k0 N
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it
      ' `, B: r- ~1 T  m6 b$ M4 |
    23. ;            will DELETE all segments.  Use at your OWN discretion!' b' D. Y- G0 \6 q* @$ T9 ~1 ]( P
    24. ;            Select Cancel or Undo before exiting the command to restore  * V# w0 }) a8 r  |
    25. ;            to original Clines.1 o/ F( d, O5 S  {. u6 i

    26. + T* _, N- n/ l* s* _2 J

    27. " X, _% {$ N/ z& ?, _# b

    28. ; j' I" E4 H& ?& c0 T# c8 B

    29. . n+ A. S  p$ v, ^0 g
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
      ( R" N' P! Z8 X! g- N% r% u5 {8 S
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)
      8 O- Y  c+ `% I; \. n
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"
      % w8 R, B+ Z# c7 w, }: S" y
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)
      . e0 o, E1 z4 k( m+ r) ^" w9 d

    34. ' i' U% P0 p5 A9 s2 d/ M
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      ! }0 F8 E0 c5 r
    36. ; This shows undo where all of the conversions that this user does while/ j% w' R1 ?  J! T& w" z
    37. ; in the command a undone as a single operation.
      ' z+ x3 y0 a  ]; \7 i* g# F
    38. ;        To convert an existing command to support undo this method is, ~& ?- _* i$ Q! O, W' T
    39. ;        typically easier.
      ; S6 D: h/ |9 `4 t% L) L+ }* P
    40. / P0 h3 r  }1 n5 j) ]
    41. procedure(LCB_cline_to_shape()
      9 r# i$ H3 Q! z- z/ w
    42. let( (lclines layer polydbid )
      4 g" U- h  b5 }. A5 m( C% z
    43. ) f' s& s& j( k: B1 b' m
    44.   LCB_Setup()
      $ c& g9 X& B( s0 c6 }

    45. + c& k# x9 K( X# t( Q# T
    46.   ; cannot have a global transaction if we want undo to roll back each operation0 y# Q3 `- m  X; S3 c0 n! ~
    47.   LCB_mark = axlDBTransactionStart()
      7 D; d; e; N  F5 t1 b/ a$ t
    48. % ~' X3 ^  y/ t8 V
    49.   LCBnotDone = t
      ) R$ U( @$ ]+ M" F* s2 T8 Q
    50.   while( LCBnotDone
      ( T# v5 P7 Z- n) q3 f5 G
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
      ' ~. @3 u$ ~/ P+ Q8 ]3 i: y
    52. 9 L4 n4 Y' \% f5 M8 ^/ m* h8 Z
    53.       foreach( clinedbid lclines
      5 P5 G! u% U7 T# O8 i1 T
    54.             layer = clinedbid->layer
      1 D9 Z3 P' ^) S. Q/ t
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      : Z: q! m( Q; t3 j- y

    56. , d9 K$ x4 ^0 V0 W2 V
    57.             axlDeleteObject(clinedbid)
      4 @, |7 K4 [* k

    58. 7 Y/ O0 o& A8 V. q
    59.             unless( axlDBCreateShape(car(polydbid) t layer)  
      + N1 f6 g  I; h
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline."): K" B2 D3 S0 p8 \! h* |  y- f
    61.             )4 P2 U% w2 I* ?5 }: q- d0 h
    62.             when( cadr(polydbid) 6 a9 j1 a- o4 L( O/ d' U* _
    63.                 axlDBCreateShape(cadr(polydbid) t layer)
      " d! P2 e9 i1 U( S0 z$ K
    64.             ). s6 m! R9 `& g( \) w
    65.      )
      . o, X5 P" x9 A: @# L+ Y
    66. % w" P8 p% _! T) f3 h. V
    67.      ; marks are only required if undo is using rolling back all database changes
      " f  z! W5 A. q5 k- I
    68.      ; when command is active. When undoing each conversion this is not needed: N2 m0 x& e. A# _5 R2 z2 s
    69.      ; nor is Oops functional.
      % v) C: {+ E4 G4 B
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))+ ?: v4 `; P7 s: t
    71.   )
      * N& R) K+ j  }  F) h! k9 H  e" t# Z
    72.   ;LCB_Done() ; just in case
      , {( B5 e" i- Z$ m4 z
    73. ))- E' s* ]! W# y9 E2 ]( w( u6 C# S
    74. 2 B% a) ^/ {9 }7 C8 j6 L
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      3 {4 ]. @/ w; w5 O( \- g' `: x
    76. ; This shows undo where each conversion is supported as seperate undo operation3 Q! A7 H! K6 h# X0 p* [
    77. ; in the command a undone as a single operation.
      7 F% {+ H- X& P  e6 L2 W: C
    78. ;        To convert an existing command to support undo this method is( d7 Y* C0 _% P
    79. ;        typically easier.
      1 w6 M% \  S" t# `4 A; t3 Y- u8 m

    80. 4 K+ C/ I6 {7 D' n9 r, @$ Y6 @
    81. procedure(LCB_cline_to_shape2()
      8 h1 J/ G- \( j" N6 N
    82. let( (lclines layer polydbid doMark )3 O$ ?- g/ q8 h# Y
    83. 3 c* `7 F1 ?' t. f. i
    84.   LCB_Setup()
      , G7 y* T" N2 _

    85. 1 I) Y# |5 K& p& r( n
    86.   ; cannot have a global transaction if we want undo to roll back each operation& s7 O( a. R- s

    87. ' a) e3 B6 X! r9 i
    88.   LCBnotDone = t
      - L1 N6 O& M( w. U* ]
    89.   doMark = 'undoMark% P, p4 z4 O  @1 s
    90. 7 H1 p% ?# v5 r! \. I+ K* Q
    91.   while(LCBnotDone
      " c) D1 x% m1 p  r5 s
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))* Q# N- I! @! {  w

    93. " k1 G9 \0 X+ }9 i& N4 G, e" _4 X
    94.       ; need to do a start/commit for each operation if we want undo to
      $ w% A% R" R2 m6 g. }
    95.       ; rollback each change. This mostly disables Oops
      ( V& S. G" H7 I8 ]& k% T
    96.       ;          don't want to start a transaction unless we have work to do or it will9 O! E0 k, L' ~( ^, B
    97.       ;   do a unneeded undoMark.
      - J* [1 g5 O% \8 C1 J& ]' o8 d: ^! A
    98.       when(lclines
      2 S1 ~3 u5 ^% ^' E6 }6 [+ J" Y. `  f5 P
    99.           LCB_mark = axlDBTransactionStart(doMark)
      ) D4 y8 z( @$ |9 J5 m
    100.       )7 W% V1 Q! I; }" L

    101. & y7 s9 \% u. Q
    102.       foreach( clinedbid lclines
      & r" S$ B' F6 P7 x! G: L/ d
    103.             layer = clinedbid->layer
      0 p. \# M8 N8 S4 k0 C
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      ; ?; v8 b4 C% h, i: T
    105. 6 P( X3 Z+ s! w4 C' S4 I
    106.             axlDeleteObject(clinedbid)) k5 x  k3 Q  R
    107. 0 F1 F: {  l# ]
    108.             unless( axlDBCreateShape(car(polydbid) t layer)   f( {' E5 T! k8 x4 N
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      - h4 R- [+ o0 v3 g6 R
    110.             )
      3 t+ c2 X: ^" W3 V! H8 Z% \
    111.             when( cadr(polydbid)
      ' l* W9 i: i2 B% x$ t; j9 r
    112.                 axlDBCreateShape(cadr(polydbid) t layer)
      1 X7 s# Y4 x6 n# Q9 n  H! }% d. Q
    113.             )4 ~4 ?: D6 \$ o% S# B( L( B" p
    114.      )
      ! v4 E, z* K% P! ~4 N+ _& G$ R+ {; A
    115.   |! ^2 ^: X5 l" d
    116.      ; marks are only required if undo is using rolling back all database changes2 C; X) O$ v  x/ L" N. V" [( l
    117.      ; when command is active. When undoing each conversion this is not needed
      ) n" c% C. }% X1 T8 }/ I6 v  s# K" ^
    118.      ; nor is Oops functional.
      ) O3 I6 ^2 }. V/ m( J
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))* u2 J& G8 W: h! h
    120.      LCB_mark = nil4 a5 w, p+ |$ d
    121.   )
      * I! k' E+ a& f9 g1 T
    122.   LCB_Done() ; just in case5 r; c) _0 X) [+ h1 R2 O
    123. )), v1 K3 I; X. j. q- V
    124. 9 L7 X1 s: x( T' J

    125. # J- z, P. F0 m
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;/ p, h! x" ~" k; {2 O) [% G; @
    127. ;; support APIs; _1 _2 w! G" d: ]! B

    128. % `) R; y( W( M+ X0 Z
    129. procedure(LCB_Setup()
      6 y0 [' n- I% A1 h
    130. let( (popup)
      , q5 M$ N" r, s5 y3 I7 L
    131.   axlSetFindFilter(?enabled list("noall" "clines")
      ; M0 z/ @7 J: Q9 o& R# L0 a  L
    132.                   ?onButtons list("noall" "clines"))' y* R* u! e; [) W
    133. 2 w2 [/ X% Z& B2 j/ _" X) j" A! S
    134.   popup = axlUIPopupDefine( nil (list7 T9 o0 ]3 X) J2 L& x
    135.     (list "Done" 'LCB_Done)
      ! z/ h0 H/ z) p$ e. _6 y
    136.     (list "Oop" 'LCB_Oops)
      9 `' o* r8 M8 Q! C# J
    137.     (list "Cancel" 'LCB_Cancel)
      9 L1 [* z+ V0 \
    138.      ))
      " s- A6 L0 u3 w) n1 p) z

    139. ! L3 h/ ^! N1 U
    140.   ; Snapping is not required by this command but this shows the ability- D% s- A2 ?2 P. R, p& [  V1 j
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu2 i, @0 m0 L9 x1 B# u
    142.   axlSnapEnableAtRMB()
      ( {4 |: g; L7 v1 f. P
    143. % X3 m6 g* Q# [
    144.   axlUIPopupSet(popup)
      " K8 ~/ h$ R3 {8 y+ q
    145.   LCB_mark = nil$ w" O" h4 \- }" P
    146. ))
        F8 T" y* ~0 b. B5 e& d  n9 i
    147. ' v9 v* |# g' M+ E6 ^' J2 L4 p
    148. procedure(LCB_Oops()
      9 V9 V& ^5 X4 |2 t: w/ D# z% m
    149.   when(LCB_mark
      % b' a; d3 t! d% W
    150.     if(! axlDBTransactionOops(LCB_mark) then+ K' Z2 H6 k9 H4 d8 m9 ~
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --")& n0 O0 P4 g+ W) z( m1 @# ^
    152.     else. Z0 Y! |6 C. b0 A3 F. d
    153.       axlUIWPrint(nil "-- Replacing Clines. --")
      3 W( O& C' h! m6 \7 r
    154.     )
      : m1 P) s) Y& R9 x" D
    155.   )
      ' @7 h) Q, X: N0 o" _+ r8 n
    156.   axlClearSelSet()! x& S% |; L  o. F  f$ s: R6 i$ y
    157. )% R) J' h. n, i; c# `8 Q) n' x3 g& Y
    158. ) |$ F& d- q. c
    159. procedure(LCB_Cancel()
      * y! p6 _7 p4 m) k) F
    160.   axlUIWPrint(nil "** Cancelled Program. **")
      1 g* U0 H1 c6 R0 s
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark))
      % R% S" ?$ X: W( c  F; K! s# r5 X
    162.   ;LCB_mark = nil9 @& U6 h" w; s- q3 g
    163.   LCBnotDone = nil
      5 Z6 z! P7 @# F( ^, J
    164.   axlClearSelSet()- j+ e( o- A3 i& |
    165.   axlCancelEnterFun()
      ) d. Z% |) m9 T( M' e7 @  Q. l" I
    166. ): C9 x( y  k# l9 e& b

    167. 9 h, Q( I- q- [3 F( j! `% |9 r

    168. ) r3 }8 U9 I8 L1 ^. f+ [  v
    169. procedure(LCB_Done()
      + n1 R0 ^2 B- ^/ i$ S$ B
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark))
      3 g1 a" g2 Q6 a% ~4 l- ~
    171.   ;LCB_mark = nil$ P: @) o; z) b( r
    172.   LCBnotDone = nil! W  M; u- K7 p6 J4 f5 H/ U
    173.   axlFinishEnterFun()
      9 j6 d& v% b' Y4 Q5 F% ~$ W/ }5 G9 o
    174. )
      - i, W5 L5 b  m. e  u* k. N
    复制代码

    点评

    删掉也不行,还是报错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
    * }# q7 ], N0 Y9 y" K% L$ ~16.x及之前的版本需要把出现的两个“?undo t"删掉。

    : \$ t- L. i# l0 Q8 S删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)# w. q3 g9 D/ g/ R

    该用户从未签到

    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
    # g) D5 ~* C0 j# X# d; K  Q) FAllegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    7 O9 A7 e( J3 M- g* p
    学习了
    / ]1 {! V& l, Z! H  y" _( H

    点评

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

    该用户从未签到

    5#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:00% Q" B1 T9 {, m& Z+ |3 j
    学习了
    ' ?: c7 ~2 C2 N
    请问16.6有这个功能吗
    ; i2 Y- ^: i3 S# l+ p5 ?4 V

    点评

    新版本有,我用的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:140 M1 P0 h+ T5 O
    请问16.6有这个功能吗
    ( v: l& l( C/ b+ s$ F
    新版本有,我用的17.23 N9 K& }2 ^* j; Z0 W

    该用户从未签到

    10#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来: w6 _( K9 Z4 n+ f

    该用户从未签到

    11#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21
    - Q2 c. X: s. `% d2 Z% \allegro productivity toolbox

    1 u1 V7 f1 R; e1 [請問是在哪裡呢? 我的沒瞧見
    " b& Z% {& L, r# M% c

    该用户从未签到

    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
    ' A8 D5 b/ s; O16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...
    * L4 q- m8 Y4 G- x- _
    这个15.X版本就已经有了的。不过还是感谢回答。6 W2 o4 f/ _8 d0 B  ]

    该用户从未签到

    14#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16  w3 u# F4 U9 R
    从16.6开始就有了
    ' `/ }* R5 O! D  Y6 ]% ^; R# g/ y- |
    我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!& U4 \$ [7 c+ N( q, L

    该用户从未签到

    15#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16
    3 ]! U4 X; S1 {' W' {1 u5 s/ S从16.6开始就有了

    * q, h" O+ v* i, D是不是需要再打个补丁?/ ^$ n) d3 y' s) U8 }6 K

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

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-5-24 02:43 , Processed in 0.109375 second(s), 38 queries , Gzip On.

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

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

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