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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑
6 q; g! }" M$ x2 F* B; c) H4 U' X3 x
有没有cline to shape的skill,帮忙分享一个。谢谢。
, h. J, L5 s) G8 [* {8 N我在论坛上找到的,运行命令后,会出现:
# D9 B% l. L! [' O: XW- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed
8 G% j/ ^8 r  I1 c; B$ I, k4 W3 u3 I$ ], J
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    3 l. G  r8 t/ T) F) M6 j

    点评

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

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    ! V" Q% h1 `6 m  C- q8 F2 k; k0 Z* E3 N' e8 u
    1. ;###############################################################################
      / Z# E2 k: b9 q
    2. ;                                                                              #" ~1 }" g5 Y( _% X: g& _
    3. ;                      Command: cline2shape                                    #
      + {9 o* s8 s+ o! y3 q& ^  i2 a
    4. ;                   Skill File: cline2shape.il                                 #8 p) \; I9 N1 V9 N, H" Z7 r
    5. ;               How To Execute: Command> cline2shape                           #" ^! l) U' c2 p% V1 d7 \0 B
    6. ;                                                                              #0 z4 `2 k* U: D( d9 k' L" z
    7. ;  DISCLAIMER:                                                                 #3 P/ c0 E1 R: x# d1 w
    8. ;       The user of this command assumes all responsibility and does not       #
      2 T9 q* H- Q; N/ Q
    9. ;       hold Cadence Design Systems nor the author of this code for any        #
      % k, F, E6 M; i
    10. ;       unwarranted results or problems due to the use of this code.           #) B7 v' j" c; t. T8 i
    11. ;                                                                              #" Z8 W3 n  |2 o  {
    12. ;       This is non-supported code and the user may modify it as needed.       #
      # I. P/ C" \. V  P- r) y% }
    13. ;                                                                              #+ Q. |1 f0 X8 h$ f; C
    14. ;###############################################################################: j2 D/ N3 I5 w1 ~

    15. & e' @& U  a! f7 q& `1 f: `* [
    16. ; demostrates
      6 Z* q/ A8 {7 T
    17. ;        1) style for an interactive command
      3 {" D* n: e3 w* }3 w! O; F; [1 P0 W
    18. ;        2) use of the database tranasction APIs$ F' g1 s% D2 S( i' J- \
    19. ;        3) two styles of undo/redo support
      ! _: W5 o, z2 J
    20. ; Added undo support9 n; B( {$ ^( o9 f/ ?( k
    21. % K% v$ l# L/ Q- V* l
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it ) x: K: H; P7 G# r( Y  T: U
    23. ;            will DELETE all segments.  Use at your OWN discretion!( @. O0 m4 X* j/ B
    24. ;            Select Cancel or Undo before exiting the command to restore  
      6 V8 d% s8 \/ K, a9 }2 [
    25. ;            to original Clines.
      8 S- y% y9 `" k3 R( l! j( g

    26. ) Y* x1 U9 i7 E- {
    27. 0 v1 p% a9 ^7 y+ D" a4 I
    28. & \+ I- c  F- S( M

    29. + L0 f! F1 _: [' {( U/ F9 S# S9 r
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"- [" o# I# f/ J) A( J
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)- f9 C( V) M9 b5 n
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"; A  e7 }' z  r( Y4 {
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)
      2 T$ Q" u- O2 `( z6 v7 c, b
    34. " F( ~' e4 Q, B6 V3 @0 A
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      4 U; V5 R" l8 M/ v# w& k4 B
    36. ; This shows undo where all of the conversions that this user does while, v, @& F: o& N) M9 l
    37. ; in the command a undone as a single operation.. G) M8 a7 m. k3 ?3 O! L
    38. ;        To convert an existing command to support undo this method is
      4 A( ?5 J: i, R# o
    39. ;        typically easier.- p( H5 E- j$ {$ f

    40. / J, W  |5 S) p" s3 G0 v! P
    41. procedure(LCB_cline_to_shape()
      / y1 F  D9 |7 g8 i- X
    42. let( (lclines layer polydbid )
      - Z* K8 {) d# |! }- K
    43. 0 K. A/ A4 ~$ E  W
    44.   LCB_Setup(); L9 k$ I) L* U0 w

    45. 6 Q: ~5 |" s6 d7 Z2 H$ r9 C, m
    46.   ; cannot have a global transaction if we want undo to roll back each operation- m) y: A8 j" y" `! K3 Z+ {$ r
    47.   LCB_mark = axlDBTransactionStart()
      8 |9 T, e0 N- A2 j6 k

    48. . D! M9 _7 V# Y$ J7 M% ]% Y
    49.   LCBnotDone = t
      6 D: d8 g' y$ }% {0 c4 R
    50.   while( LCBnotDone) L' [( I- j& w' G# b. g+ ]
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
      " V; [  O2 s) K% F9 g8 v% }
    52. # u( F/ J! n9 n+ K# w3 G& G- H
    53.       foreach( clinedbid lclines# g9 X  M% \* N7 b
    54.             layer = clinedbid->layer. F+ Y# p. |/ R
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      6 V5 D7 u/ }9 G0 [6 ]! R
    56. $ P" h; Y* i0 `+ T: M$ C
    57.             axlDeleteObject(clinedbid), _  |4 h+ V; Q+ n* F3 j; {

    58. / E' l& v* Q, u, c
    59.             unless( axlDBCreateShape(car(polydbid) t layer)  
      # R0 O# R* g, t& r: w8 T5 }& }
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      5 d6 O+ y: S/ D! \5 K- O6 G, N
    61.             ): p* w, Z6 b1 y. F2 b# @
    62.             when( cadr(polydbid) 2 _9 s; o8 T% F- s
    63.                 axlDBCreateShape(cadr(polydbid) t layer)
      9 \$ R. F/ x6 X; z* U
    64.             )
      ! s+ S- A3 Y* n, E+ I: ^/ x
    65.      )
      : K! u( K& L( K
    66. 4 t$ J; R8 k. ~  b  L1 R
    67.      ; marks are only required if undo is using rolling back all database changes
      2 k* E6 Z, n) r4 p1 `8 }- A
    68.      ; when command is active. When undoing each conversion this is not needed3 V+ N/ Z) |" T& @
    69.      ; nor is Oops functional.
      ) Z, O0 j! w& F8 [: |
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))
      ' [4 ]( z( B' f4 ^+ i
    71.   )( ~% z: o6 a! m7 a9 y' a+ S
    72.   ;LCB_Done() ; just in case8 d3 U$ t0 v3 b1 M% v( l' q, a9 b7 J
    73. ))2 b( K1 b6 D. R) \, n6 y2 g7 v) O
    74. 7 Y; o. ^) ?' s5 L8 A9 V
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;$ b& v0 A9 K' W
    76. ; This shows undo where each conversion is supported as seperate undo operation
      # D+ Y. e+ T9 d, M8 ]: @: ^
    77. ; in the command a undone as a single operation.
      * J+ P7 R5 B' \
    78. ;        To convert an existing command to support undo this method is& Q' D: C& h# W+ L; I8 j
    79. ;        typically easier.$ J: Y7 M' N2 t. |  _* U5 X+ I

    80. & b0 F9 V: a3 {2 a9 P7 ~8 D* {0 g
    81. procedure(LCB_cline_to_shape2()8 ?4 H" F* i; r! D1 t; Z  ]+ v
    82. let( (lclines layer polydbid doMark )# u- H) b5 T; Q) W2 R) _* ~
    83. , W8 Y8 ^; k1 z1 u- {' q/ W
    84.   LCB_Setup(). [* x- A1 f9 r" F8 Q
    85. 1 O3 H; Z) q% m$ e) q7 X
    86.   ; cannot have a global transaction if we want undo to roll back each operation
      1 d( q6 d7 C  e" |. G3 h1 @
    87. ) ]3 F+ z1 [' D1 U9 A
    88.   LCBnotDone = t
      1 z) Q4 ^% u% z! L4 U8 Y0 m
    89.   doMark = 'undoMark) y: D' Q: r8 |5 y0 p

    90. 4 ~/ c( P  J$ M* I) d
    91.   while(LCBnotDone
      7 P: U# \+ {* @" c+ s0 M/ f; g; j
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))- V- L! ?7 G. A3 O( z

    93. + K- b+ B( f2 _0 L7 Z
    94.       ; need to do a start/commit for each operation if we want undo to . G& |3 ]7 y2 f, ?) a
    95.       ; rollback each change. This mostly disables Oops; f) G# @* s) `7 J6 [9 h
    96.       ;          don't want to start a transaction unless we have work to do or it will
      & z! |9 ?# T2 F
    97.       ;   do a unneeded undoMark. - a+ j4 y" w1 W: G  T- a* |
    98.       when(lclines ' R& Z6 L2 T# o# |
    99.           LCB_mark = axlDBTransactionStart(doMark)
      & x  C( W7 T  h+ J( M$ d
    100.       ), u' y1 n6 l: Y! w

    101. ' E' c+ f+ a* U
    102.       foreach( clinedbid lclines5 n: Y  h& K5 _5 P9 o' k4 f! e! F2 X% y/ T
    103.             layer = clinedbid->layer
      # u' s2 v, J/ U
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")2 t; c# I! w: b5 e% |. n1 d
    105. + C- P# [. A; Q
    106.             axlDeleteObject(clinedbid): r" Z, Q9 S1 N; N3 O  T
    107.   R9 V! p4 i4 j  H' B$ k0 H6 y
    108.             unless( axlDBCreateShape(car(polydbid) t layer) 1 z* c9 k5 u) M1 `
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")6 }) }  J3 y4 A% f
    110.             )
      1 C( V. O3 B9 _  h
    111.             when( cadr(polydbid)
      ! ?( {& \: k$ Z, w  W
    112.                 axlDBCreateShape(cadr(polydbid) t layer)
      2 |- V4 e! E1 m9 v3 h4 w
    113.             )" J% u- @% L+ J, D: ~! n  l; X/ ~
    114.      )+ I( I- Y- K: t! ]  C6 F( i8 w

    115. $ `; Y; ^$ l1 l
    116.      ; marks are only required if undo is using rolling back all database changes5 p2 [; ?6 ?6 e1 f
    117.      ; when command is active. When undoing each conversion this is not needed
      ' N" S( T! b6 p% Q) h
    118.      ; nor is Oops functional.
      # p  x* [% p$ U8 p/ m
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))' Z3 [; h( G4 o1 j! ~1 Z. K) G+ {& h
    120.      LCB_mark = nil
      ! B8 X% ]5 Y# `4 a0 [
    121.   )
      . y% J& t' i  z3 g- b
    122.   LCB_Done() ; just in case
      5 E+ Q& B; T' |% f/ y
    123. )); k: m/ r" X) S- I5 v

    124. 3 n4 n# \9 T$ C: X% b

    125. ! i$ @7 b2 H' W' G
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;- T  n( D; `# u
    127. ;; support APIs9 n/ q; \7 |0 Y% h6 e! k6 k

    128. + L' |; K2 s8 ~5 ~. J1 x& t8 `
    129. procedure(LCB_Setup(). B1 Y' o* ]7 w9 E8 p5 B
    130. let( (popup)
      * N7 k$ j  j  C) E' y8 _$ C
    131.   axlSetFindFilter(?enabled list("noall" "clines")
      & V5 I# o* g1 M* u0 W/ X
    132.                   ?onButtons list("noall" "clines"))
      " s) F2 a6 x2 [3 K: S! h

    133. ) t9 m1 q+ ?3 _
    134.   popup = axlUIPopupDefine( nil (list4 i. x0 V3 z# j: v- U# \
    135.     (list "Done" 'LCB_Done)0 ?) @1 r) X1 j! W
    136.     (list "Oop" 'LCB_Oops)
      6 I; x/ [* W$ g
    137.     (list "Cancel" 'LCB_Cancel)
      # M) |- W0 v* ^9 Q
    138.      ))2 v3 m4 d8 s9 A7 x* X

    139. + R. c- O; x; M* \3 w
    140.   ; Snapping is not required by this command but this shows the ability4 M. k% J* O2 b- w) V
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu
      0 ^. ?6 i+ j# ]7 {: B$ c
    142.   axlSnapEnableAtRMB(): r# `) l5 i& _  M/ D
    143. % U4 F: {" G2 e$ `* G+ O
    144.   axlUIPopupSet(popup)
      : _6 _7 j! r  j6 c& a
    145.   LCB_mark = nil
      6 h: q( z+ {; j+ j. |' M; l; H+ E
    146. ))
      - A1 [) s$ R3 W' f6 v( G) T- L

    147. + M9 \# J5 N5 l% r' S- s
    148. procedure(LCB_Oops()0 n8 E: ~( b3 T! |
    149.   when(LCB_mark
      - n: ]5 V, e4 B; K+ t1 A
    150.     if(! axlDBTransactionOops(LCB_mark) then
      . e$ J" a- h3 `5 v  _+ g
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --"): z5 U: Q/ G0 X
    152.     else# `  E- M" w( W
    153.       axlUIWPrint(nil "-- Replacing Clines. --")3 n1 p2 h8 z9 i8 P
    154.     )
        T+ N. U' e( `* h! K
    155.   )/ `# e% W" a- V& g! K, k" N' O
    156.   axlClearSelSet()
      ! R6 s' d3 f. h
    157. )
      ) V0 {( M1 F2 M

    158. ) k+ s2 G; Z% H
    159. procedure(LCB_Cancel()
      4 p3 W8 T% F( {9 J, O: F
    160.   axlUIWPrint(nil "** Cancelled Program. **")) _4 u2 `" n8 c6 E, U# M% ^9 X
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark))( Q0 r7 w; V, Q/ A* ?! T- W# Q9 A! ?
    162.   ;LCB_mark = nil
      3 L' P( z1 @% O( M% h" j
    163.   LCBnotDone = nil) Y  F7 L& y. U5 |" p' f" D9 t( v
    164.   axlClearSelSet()
      ! R* ^- ~, Q! \# d! q( C3 d" ?
    165.   axlCancelEnterFun()
      7 b. V8 p" v( b& F, d
    166. )2 e( h6 D& O' k( i0 N
    167. ) ]' N# ?% K5 J0 t8 m
    168. 1 t7 C" P* D, T- P) X' S
    169. procedure(LCB_Done()
      ; U; w$ X! w6 \1 `3 Z5 ~
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark)). p  G) I: H: \' e' C+ n. r6 ~9 }0 o
    171.   ;LCB_mark = nil
      * p' W3 w) f: T7 c, j
    172.   LCBnotDone = nil
      4 A6 V$ U5 ~" ?. y" O
    173.   axlFinishEnterFun()# w1 ~9 ^+ Y6 B# I4 ]: x
    174. ), y( \9 r: ?. i" j( C
    复制代码

    点评

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

    [LV.7]常住居民III

    推荐
    发表于 2023-6-5 16:00 | 只看该作者
    db-_- 发表于 2022-2-18 11:54! y8 j  }7 J. G  j/ ]/ }2 y2 [- }! S0 F$ O
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    8 d8 Q/ K2 m. V4 P
    删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)5 P! `- s! P+ k0 U7 X" R  U$ H

    该用户从未签到

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

    [LV.2]偶尔看看I

    6#
    发表于 2019-1-4 10:00 | 只看该作者
    dzkcool 发表于 2019-1-2 15:503 q8 T2 b$ {8 k+ ^
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    6 w( T6 Q. V7 O: p/ H. u
    学习了
    ( Q( h% l6 _* b

    点评

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

    该用户从未签到

    7#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:00; e; `4 F8 g: |" J
    学习了

    9 c" i; y8 a. u$ D请问16.6有这个功能吗
    3 G. \& p0 i. E" D

    点评

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

    [LV.8]以坛为家I

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

    点评

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

    该用户从未签到

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

    点评

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

    该用户从未签到

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

    [LV.2]偶尔看看I

    11#
    发表于 2019-1-4 14:25 | 只看该作者
    lavidayao 发表于 2019-1-4 10:14/ O- s+ R( k5 [- l7 ]1 J
    请问16.6有这个功能吗

    0 V) L! q$ y! s* R& ~7 h& {. k- T新版本有,我用的17.2
    + C. M2 T1 G, ]5 z. H

    该用户从未签到

    12#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来; A6 U3 r# k+ T7 K' n- d. i; g3 s' N

    该用户从未签到

    13#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21
    1 _* W  r8 x/ e* G/ ?7 aallegro productivity toolbox

    " U# J- o4 M. s# l+ b  S5 v$ ^- _請問是在哪裡呢? 我的沒瞧見3 U7 p: `- |% V* a8 u

    该用户从未签到

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

    点评

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

    该用户从未签到

    15#
     楼主| 发表于 2019-1-9 17:31 | 只看该作者
    何文斌 发表于 2019-1-9 10:169 c& F# g! z0 t5 k
    16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...
    ) ^% J& u0 S! u+ q4 e$ |# y
    这个15.X版本就已经有了的。不过还是感谢回答。
    + F# I& L, W- p) A- x: }

    该用户从未签到

    16#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16* S6 O/ b4 |9 j
    从16.6开始就有了

    & r3 V5 [$ ]4 S3 X. m7 b; l1 O我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!( n/ z0 B9 a2 M- j7 |# \

    该用户从未签到

    17#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16
    % P% M$ ^/ `) Z" W从16.6开始就有了

    . o0 c7 k1 S- e0 K* I0 k+ C是不是需要再打个补丁?
    ; t" g$ c9 R; ]$ L: l

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

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-11-1 17:26 , Processed in 0.187500 second(s), 38 queries , Gzip On.

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

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

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