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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑
1 s3 V" b8 g% K  G. V/ T. z: _9 [
4 Y7 `8 `5 ~5 a. K; i- u* K有没有cline to shape的skill,帮忙分享一个。谢谢。, n$ ^% u4 _4 a/ C/ d- f2 U; S
我在论坛上找到的,运行命令后,会出现:" o- p2 y& N' s+ P5 D. B% Y
W- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed4 {/ n4 L; l8 K, X

2 ?) W7 ?! S/ O- k" c( d) H; j
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    2 W' `9 a% B5 d3 x5 O, [+ J

    点评

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

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    + w9 Y% n# O3 M* M8 y- s6 P9 a/ H$ H8 A. `: H4 W$ V: I
    1. ;###############################################################################
      1 C; z3 @7 L, x/ i9 n- n
    2. ;                                                                              #
      2 Y% F  f: k# e6 O/ X) M/ Z- a; I
    3. ;                      Command: cline2shape                                    #
      8 n# V$ ~2 o8 r; M1 V: x7 r" \
    4. ;                   Skill File: cline2shape.il                                 #
      3 [* r$ [3 H5 ]/ J# G
    5. ;               How To Execute: Command> cline2shape                           #
      + S% w) K/ A, @
    6. ;                                                                              #
      9 [6 l; R  p% ^' e) o$ q
    7. ;  DISCLAIMER:                                                                 #
      * d4 k6 `* B* _7 g0 V% L9 O! T2 k
    8. ;       The user of this command assumes all responsibility and does not       #
      / `" c) C( S& e5 j8 j/ E, S
    9. ;       hold Cadence Design Systems nor the author of this code for any        #
      + K4 i: H. G: }) m6 x  r
    10. ;       unwarranted results or problems due to the use of this code.           ## L5 q1 P4 J) G7 g# A
    11. ;                                                                              #
      : I' C0 H2 C) {* v
    12. ;       This is non-supported code and the user may modify it as needed.       #; e+ ]( b% c* B7 D
    13. ;                                                                              #
      % b& h4 o; A$ `0 s
    14. ;###############################################################################! r" m* E& w6 b

    15. ) b5 A# u" D! x! T/ \  S; E$ h
    16. ; demostrates
      & {4 x0 M* N# S6 s0 D
    17. ;        1) style for an interactive command# H% o) Q& [+ q: o8 _& q% |9 U
    18. ;        2) use of the database tranasction APIs# U, m& T. G# X4 ?2 t
    19. ;        3) two styles of undo/redo support/ Q# q7 M; }1 C+ T. @9 P
    20. ; Added undo support" X# Y4 D9 o* Q& o" c" a. M0 G

    21. 8 S+ W1 Y- M+ b- C# h: b
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it * w# x) l) a' s9 ~
    23. ;            will DELETE all segments.  Use at your OWN discretion!
      * v0 s  \- C" ?3 \
    24. ;            Select Cancel or Undo before exiting the command to restore  6 U5 e8 V  T$ D/ I  E
    25. ;            to original Clines.
      6 J) b0 S1 k! M) E6 n  f$ P* f6 n

    26. : Y5 \6 O) O1 z- Z, D5 O# A* @
    27. 8 I( F8 L, {  {% T
    28. 8 {- h- [9 W& t& m; v

    29. + o7 o% U+ G8 x2 |4 M, l1 Y
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
      4 Z5 V* E- i+ M3 J  ^" \  @) M
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)5 {6 \+ q) ]$ R
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"* a- ~% L1 S) M4 P2 ?& l  C8 _
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)  \! M+ W* M2 G$ o' D/ t/ k% B

    34. 0 L! y" W3 b% P1 U% o
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2 c* `: S# G  Q2 C
    36. ; This shows undo where all of the conversions that this user does while: a9 l% S8 Z: X5 t
    37. ; in the command a undone as a single operation.6 W+ j6 H2 H! _# Q! h
    38. ;        To convert an existing command to support undo this method is
      9 b1 U" |6 Z0 S- _& ~
    39. ;        typically easier.; v1 x  J0 p6 ~. J8 U0 v! x' P
    40. - @5 f, V9 Y' z  V
    41. procedure(LCB_cline_to_shape()
      - G% ^, |6 m8 r8 [+ n* z( f
    42. let( (lclines layer polydbid )
      3 y# {" c8 ?, J' _( _
    43. % L. f) E# _$ ~, L
    44.   LCB_Setup()
      9 l/ C6 o% z  Z
    45. & [3 G/ {+ e; A- d, ~& y  v$ Z4 x) w
    46.   ; cannot have a global transaction if we want undo to roll back each operation
      $ n6 L; n; Y. A9 {8 T8 {$ }
    47.   LCB_mark = axlDBTransactionStart()
      # x# J1 A+ q. o' Q5 w/ j0 E; E

    48. , ?  R2 u1 [9 O$ c" U3 R
    49.   LCBnotDone = t- @. `6 d8 l5 y! U
    50.   while( LCBnotDone
      6 Z) c& B/ N( D8 @6 X# U1 p2 H
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))! u: w2 S6 g2 N
    52. 9 c0 t# Z% `; P5 @3 G0 I
    53.       foreach( clinedbid lclines
      & P" ^3 {$ F  d4 z( ]
    54.             layer = clinedbid->layer
      ; N$ a! u; ]% I+ o$ @
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      4 B( c$ w1 o1 `4 U6 X8 E
    56. - K1 ~- [6 O1 r* o  g; g/ o
    57.             axlDeleteObject(clinedbid)
      * _- d- G( P1 X" ?8 A& J, ~

    58. % k8 U: y* K# L) S+ v) d
    59.             unless( axlDBCreateShape(car(polydbid) t layer)  2 ^( T- D% T% J5 ^
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      * D: L( `% M3 N7 {2 `4 R
    61.             )5 x: d3 q& h* q& R7 j
    62.             when( cadr(polydbid)
      4 L8 l5 p6 J, U
    63.                 axlDBCreateShape(cadr(polydbid) t layer)
      ( p+ \6 T7 U7 Y- \1 H- g
    64.             )
      ) q5 @$ h2 h' a' X% [0 c9 d# N
    65.      ); x! w! B1 d% N5 ^

    66. 7 F( y( x8 n* s1 n9 ~, r  u
    67.      ; marks are only required if undo is using rolling back all database changes
      5 [, N8 g* E) g: _/ S- j
    68.      ; when command is active. When undoing each conversion this is not needed
      + t4 L2 F! Z, y5 Y3 A& c3 t3 p
    69.      ; nor is Oops functional.5 S9 r% a- u8 ]+ A/ D
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))* c* `( r6 R) \% e$ `6 Z7 s
    71.   )
      2 x  Q) N. y1 K/ @  ?# m
    72.   ;LCB_Done() ; just in case$ F# q4 g/ `' C. O! _
    73. ))) ~! ?- N: d, E  a# X
    74. # f0 Q9 @- M* h0 X8 B. u& g  P
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1 ~3 M: G: b3 }6 L% [
    76. ; This shows undo where each conversion is supported as seperate undo operation, ~# a' t0 v# y9 G# x8 ]% x
    77. ; in the command a undone as a single operation.
      ! s; m' w1 y. H2 e4 K1 B2 [* K0 \9 P
    78. ;        To convert an existing command to support undo this method is# w% ^3 _. |) A: J9 Z8 N( ~
    79. ;        typically easier.5 H+ `5 [2 k! e: e$ J' r
    80. $ k+ D- u% W5 U) b% O
    81. procedure(LCB_cline_to_shape2()2 f  D- n' i# T) O: j3 t/ f0 _4 v( D  U# {
    82. let( (lclines layer polydbid doMark )
      + W* Z: E2 d- ]6 R& B5 n

    83. $ [- ?+ C! y& P% w7 [/ a
    84.   LCB_Setup()
      ) l; {* c2 R0 {3 }- Y: h1 g9 _3 h

    85. 0 L% a; G0 O8 y! W2 D4 H. h: b  R
    86.   ; cannot have a global transaction if we want undo to roll back each operation
      2 K! [4 G* b, f7 l" l9 i4 X
    87. " e% a% e0 P2 I$ B2 _$ X/ f
    88.   LCBnotDone = t
      . N/ f: f- Y* K9 M$ g$ n8 m
    89.   doMark = 'undoMark( n) V( |8 S" c5 N
    90. ! h9 i; s" c* u% y
    91.   while(LCBnotDone
      - {0 r! M0 o+ F* b9 h
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))3 q( Q: T/ B% n4 ^& N0 B" X
    93. ! S: C- U& t# O" e0 m
    94.       ; need to do a start/commit for each operation if we want undo to 7 I$ v, r; H3 m+ t5 `/ b8 K
    95.       ; rollback each change. This mostly disables Oops7 O# ?7 u1 v- _* S# L
    96.       ;          don't want to start a transaction unless we have work to do or it will# h  Z7 @  V& P. L4 F. i# {
    97.       ;   do a unneeded undoMark. . R" r6 `+ a% ^  B# P% I- g
    98.       when(lclines
      - |; n0 @* ^" J. f3 \* z. u+ L
    99.           LCB_mark = axlDBTransactionStart(doMark)
      4 m7 W9 a8 i: D5 L7 K( s
    100.       )
        Y) x4 M( t+ U
    101. ) z0 w8 }$ K/ S" s3 y* |
    102.       foreach( clinedbid lclines
      $ ?8 _" I9 {  [2 l1 |6 _
    103.             layer = clinedbid->layer
      ! ^  P/ }( |. f* o
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      - `. B# |' d" M/ U/ `7 Y
    105. / `( P2 m6 w1 f9 v
    106.             axlDeleteObject(clinedbid), c, Y0 l* F' ?- u3 {' C: u" G0 C
    107. # q! q% l5 Y, O: m. U& T" E8 @+ b
    108.             unless( axlDBCreateShape(car(polydbid) t layer) 8 P, b# K" Y" {9 w" ^: C
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")* t# C" R( A6 q7 P8 T) G
    110.             )6 `: l0 I9 _1 T" G' M
    111.             when( cadr(polydbid)
      5 u! m3 N4 ]3 A, u7 r9 Q
    112.                 axlDBCreateShape(cadr(polydbid) t layer)
      + z) g8 E2 k4 \' X
    113.             )
      - _7 l; g$ b% z6 L) K1 Q
    114.      )5 a, @0 n% o+ B& K

    115. & o( o. r& z. z) k9 b" X: {; Z
    116.      ; marks are only required if undo is using rolling back all database changes
      4 x* S- W! y6 ]; P( ~! {
    117.      ; when command is active. When undoing each conversion this is not needed7 b# g- T% m8 g  b
    118.      ; nor is Oops functional.( u& I' @3 }4 k6 _* O
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))
      / f1 x& l0 U1 A9 j9 V
    120.      LCB_mark = nil8 ^+ @' @5 g! Y* s
    121.   )
      ' t+ J7 t  s+ O/ {$ C9 Z! _
    122.   LCB_Done() ; just in case( f  r, {/ g; J- X+ I  ?
    123. ))
      3 b" m, r5 E2 P  o: j! r5 e) f/ ^
    124. 4 e2 N& W& g2 N: i$ m, n

    125. ( N+ K4 p' D- ~7 l: X: a
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      3 Q( o* p' X8 d: F+ S6 T7 ]3 x
    127. ;; support APIs
      4 o1 ?1 ]2 {7 F0 _+ B
    128. 0 \/ p- y3 g  g  b8 U& m
    129. procedure(LCB_Setup()
      - L- A' O9 v" I, j' e0 H
    130. let( (popup)% Q0 p/ O" p8 y9 N+ L! e) w
    131.   axlSetFindFilter(?enabled list("noall" "clines")
        S! }0 A* Y! X) ]+ f
    132.                   ?onButtons list("noall" "clines"))
      8 `. g4 g! T2 L6 v

    133. $ ^( R7 u$ D9 n3 D
    134.   popup = axlUIPopupDefine( nil (list4 U3 r- j- N* N1 `' \8 r" @
    135.     (list "Done" 'LCB_Done)% m9 t! X. A  Y$ D* f; G
    136.     (list "Oop" 'LCB_Oops)2 ~& Q: L6 i( ?2 j5 L$ `; s
    137.     (list "Cancel" 'LCB_Cancel): e' C$ J+ b7 R3 t6 q& M
    138.      ))
      9 r6 @9 A4 y5 R" D; D9 ?4 x) {

    139. 3 P5 z7 n9 J$ g7 q( r! E5 h
    140.   ; Snapping is not required by this command but this shows the ability1 O& f# ^+ Z9 o7 z" {) K/ f
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu8 u% t3 x6 K; x7 I
    142.   axlSnapEnableAtRMB()6 r% ^3 C8 s3 b* t: b" n/ P1 \

    143. 0 L+ |7 w7 m: H+ O
    144.   axlUIPopupSet(popup)
      5 `, M" q2 @5 B! |* b; w
    145.   LCB_mark = nil
      4 Q, Q$ G- I2 C
    146. ))7 M( A1 Z( x, M  ]
    147.   W5 w' d1 w/ D" T
    148. procedure(LCB_Oops()7 b" n* G: b+ f
    149.   when(LCB_mark
      4 v5 y9 j6 L; s- Y
    150.     if(! axlDBTransactionOops(LCB_mark) then0 a) d7 M, o) `3 g
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --")- @; N- _6 m. Q5 D2 G- S/ s  B
    152.     else
      ( d7 e7 W* J4 @: U
    153.       axlUIWPrint(nil "-- Replacing Clines. --")
      & E8 s$ x2 {9 }5 @3 x  J
    154.     )- @+ S, A) W$ J8 \0 y: J
    155.   ). e! ~2 r$ z, C! x2 F, ?+ a& \
    156.   axlClearSelSet()! z# n" s& |) L, G2 u; l
    157. )
      ( [5 C+ L9 E; I9 w. I8 T! _8 H3 p

    158. 3 e7 |3 g; [( y! V" M# `
    159. procedure(LCB_Cancel()
      0 D+ n9 t# ^, g
    160.   axlUIWPrint(nil "** Cancelled Program. **")2 b# t; y8 P& T- w
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark)), D8 Z! b" A2 B
    162.   ;LCB_mark = nil/ H# o( ]) \. z: e. s  E4 z# n
    163.   LCBnotDone = nil8 m+ C$ H$ J* i- W/ k% |5 q
    164.   axlClearSelSet()
      ; R2 K" H) |  _( p4 C( i+ V( ?
    165.   axlCancelEnterFun()" {& R( a  S3 E( u5 F( @3 P
    166. )4 B7 w4 m; q; f. z2 H: Z- {% }
    167. * k! V  K# q4 ^
    168. 6 i1 M. ]4 p! S- @4 \* p
    169. procedure(LCB_Done()
      * u( O6 W- F- ~3 H
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark))
      # j* P9 K' R& v- y. b
    171.   ;LCB_mark = nil% s9 h5 D: ?  _+ `; H" g6 c
    172.   LCBnotDone = nil9 W' e* F' N' B
    173.   axlFinishEnterFun()
      " S' s& C' N& O+ t0 N
    174. )" }$ f- {) b* T2 @' s
    复制代码

    点评

    删掉也不行,还是报错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. `/ e, p7 H6 w
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    * B! g' @1 |! D! z* g5 r) m
    删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)
    + l+ e2 K+ _5 g# K9 K3 ]

    该用户从未签到

    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
    3 ~5 e* E+ o  o8 ~Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
      b: U" Q- E, R4 J; ^/ S! x
    学习了4 i1 n* s# s8 b

    点评

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

    该用户从未签到

    5#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:00
    2 k3 J. O# w3 V; [# y) G0 \* D: i学习了
    . b% K+ v  b- Q* W
    请问16.6有这个功能吗
    0 w0 F7 N; R+ E

    点评

    新版本有,我用的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 l  z0 g) O# F7 d! p4 ?
    请问16.6有这个功能吗

    . @8 [: R5 ~1 h$ r新版本有,我用的17.2* S6 G: [8 b# B: B0 o" w; y

    该用户从未签到

    10#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来
    ; |0 \8 c5 m4 G

    该用户从未签到

    11#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21
      \+ d' y7 A7 U! ~+ `- g* r% }allegro productivity toolbox

    / [6 g; o7 `3 X$ M請問是在哪裡呢? 我的沒瞧見# o. L5 A# y. s+ V( ?( p- D

    该用户从未签到

    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" Q  ~6 I4 P3 j
    16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...

    . X# H! e0 F8 B" N这个15.X版本就已经有了的。不过还是感谢回答。+ W% T$ p! o* }

    该用户从未签到

    14#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16
    7 [: H9 ]& T; o" {0 Z从16.6开始就有了
    / B7 M, c3 U) _4 L! ]
    我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!
    9 E+ c4 E( ~  a" D- `. U4 o, z

    该用户从未签到

    15#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16; D6 O2 V/ X. \( D* O" ?
    从16.6开始就有了
    ! I9 X; f# {# A' M  D( |/ @4 k
    是不是需要再打个补丁?
    6 D9 j4 H- t/ N, c1 \

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

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-8-18 00:43 , Processed in 0.156250 second(s), 38 queries , Gzip On.

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

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

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