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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑
' _$ T6 p0 T! u
8 }3 ?1 h+ i- k( R/ Y% v& ?, @有没有cline to shape的skill,帮忙分享一个。谢谢。7 o: ?3 L$ c$ j* A; X1 E
我在论坛上找到的,运行命令后,会出现:3 o& F, a+ S8 s/ O( s8 @
W- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed7 _2 m! \& v' `4 v# z' p! g8 M
9 F2 y" e' n$ a0 R* `
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    " ]2 V, t1 O) |

    点评

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

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。; B3 y+ j' h1 A

    5 z4 E. _  @; T3 E* m# F
    1. ;###############################################################################; ^3 e; P7 k; d
    2. ;                                                                              #$ S% S  w8 l: O) j9 @
    3. ;                      Command: cline2shape                                    #7 {/ k, G% c8 C
    4. ;                   Skill File: cline2shape.il                                 #
      " s- ^* p, c% c/ P8 j) X
    5. ;               How To Execute: Command> cline2shape                           #
      5 \/ X9 l1 I* z# z( Z# G4 _
    6. ;                                                                              #! z# c7 z% @4 g2 r2 i- V. c
    7. ;  DISCLAIMER:                                                                 #- E" U5 y0 B4 F# f
    8. ;       The user of this command assumes all responsibility and does not       #
      * e; y' y; l' |+ B% |: C5 M
    9. ;       hold Cadence Design Systems nor the author of this code for any        #
      ; K  c3 J7 z9 g9 r+ }7 o
    10. ;       unwarranted results or problems due to the use of this code.           #
      ' K! `5 T7 ~1 N' `2 ~! J7 s1 r4 A
    11. ;                                                                              #8 q/ Q3 ?5 R. P1 ~3 X6 q) }
    12. ;       This is non-supported code and the user may modify it as needed.       #. B- K5 ]5 p0 o/ }
    13. ;                                                                              #  q" t0 P7 I9 |
    14. ;###############################################################################2 F3 ^" ^0 v( ]) N' n8 P

    15. 9 m9 Z8 f6 u9 \: H- c
    16. ; demostrates. ?# W# V) g* j$ D9 r
    17. ;        1) style for an interactive command
      ' Y- K7 v1 l$ I4 T- X' d
    18. ;        2) use of the database tranasction APIs/ i9 q. |( O0 y& \
    19. ;        3) two styles of undo/redo support4 {, m4 U0 s6 l, k- X" O8 P$ C4 `+ C' p! y
    20. ; Added undo support9 s8 ?6 t: ~5 J' Q

    21. : X- M, t3 ^- a
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it
      $ R8 [6 U) {* T. P& }
    23. ;            will DELETE all segments.  Use at your OWN discretion!
      5 i7 k5 C: _8 X) R
    24. ;            Select Cancel or Undo before exiting the command to restore  % k4 L& Y3 e4 d( x, k+ S7 Z& x
    25. ;            to original Clines.
      ; u" B8 G2 z- @( @

    26. ! C' V" S% D4 f' U, Y
    27. 9 B( z) @/ c" d' M; d4 {6 E' q

    28. 9 E6 r" u! b. Q( s0 V. h- o
    29. 1 z7 Z3 K! s3 L& }1 F8 W, w; ~
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"
      6 {0 y  t# |5 F- X2 \
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)8 H# R$ ^* ?4 ?6 J) i( C
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"$ ]# C! R* e; T+ L7 c' E- R$ V
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)# K8 _3 Z4 }3 l; m& K

    34. 3 s% V/ P2 Q3 c: f
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      $ O  s$ O5 J7 S
    36. ; This shows undo where all of the conversions that this user does while
      * a6 Q/ ^* [7 y1 e. V* ~# h
    37. ; in the command a undone as a single operation.
      9 E. m0 x  _1 H! f) U8 s* F/ T
    38. ;        To convert an existing command to support undo this method is- }+ b2 Q1 _$ b! R+ [* J' [
    39. ;        typically easier.9 W- n) G5 I. w2 u
    40. 0 B0 P! a  W$ T3 V  ]0 n1 U% N+ d, R
    41. procedure(LCB_cline_to_shape(); w) |. H5 W- `3 g0 h
    42. let( (lclines layer polydbid )( C( `5 d. Q8 `+ j8 I2 n

    43. - z( D* w. T& |9 d9 _. ^* d3 k
    44.   LCB_Setup()
      0 ?9 C2 n  l0 L% |" B/ `  M

    45. 1 v7 M" u, A8 k& @- `1 p  B
    46.   ; cannot have a global transaction if we want undo to roll back each operation7 ~: u7 d: i4 ^" j% o
    47.   LCB_mark = axlDBTransactionStart()
      ; i6 |- m. u# q, E/ T6 g) v( |, [3 }
    48. % L$ E; D, g+ l' m7 A- a1 t6 P" u
    49.   LCBnotDone = t
      - N2 \( P, `8 g& r- ?
    50.   while( LCBnotDone
      . ?# Z/ D$ p! C
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
      1 E' ^% B) {0 \  i
    52. ' \! ~2 R3 `% J2 B' v3 y5 H
    53.       foreach( clinedbid lclines6 E/ L* r4 s; N2 M3 F3 X
    54.             layer = clinedbid->layer
      # Z4 D0 e; ]2 N9 \" a% O& V/ m
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")5 L4 V# r- K0 J3 @

    56. + R: t; M/ v& r! z$ y
    57.             axlDeleteObject(clinedbid); q6 T6 O2 x5 Z. {' @% a# O& s, `9 c

    58. & z: v1 |& C4 C( @& Q
    59.             unless( axlDBCreateShape(car(polydbid) t layer)  % n5 U9 l6 g9 n
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")$ u, b% U; L7 A$ Z* ]. u- U
    61.             )
      % v2 |! r! M- E8 o, E
    62.             when( cadr(polydbid)
      / f) ^$ i7 x4 j2 N  \
    63.                 axlDBCreateShape(cadr(polydbid) t layer)
      " e/ I8 k. H; d' q+ ~8 F% N
    64.             )
      1 g9 A. H: a8 [( x  K: L
    65.      )' I5 r4 `" S) ~1 _2 Z
    66. & R8 C- G; v* R0 }; p! ^
    67.      ; marks are only required if undo is using rolling back all database changes7 H1 |! ]. T: b. ]0 h5 S% a9 j
    68.      ; when command is active. When undoing each conversion this is not needed  L4 C/ y2 ]- m2 |, A/ b1 v
    69.      ; nor is Oops functional.
      * K0 t* h; p( ]2 d' T
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))) r& t5 K. }3 |/ z$ q" W) }: p5 t, t
    71.   )
      . N: x2 a) S& {" T
    72.   ;LCB_Done() ; just in case
      / x/ t* a. y/ U, @% m; L
    73. ))
      ) i: u; _) E- c: B) P/ m& E% `

    74. 4 U' h: [1 \5 A( d. b: J
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      6 X  w' w5 o& r/ P2 q
    76. ; This shows undo where each conversion is supported as seperate undo operation. O0 I/ F' ?) s  Y& x
    77. ; in the command a undone as a single operation.
      ) D  E/ h& L& m  ]/ ^
    78. ;        To convert an existing command to support undo this method is
      6 E; @) ^8 j5 s- i
    79. ;        typically easier.- P2 k* G. @& c2 L- C
    80. - R5 p( U6 X( K2 ?0 ], g) Z
    81. procedure(LCB_cline_to_shape2()
      6 ^4 w; W/ f! ?
    82. let( (lclines layer polydbid doMark )' t. X& x$ L, |7 z

    83. , a5 ^& I, N' @( H: z$ i5 Z. W0 v5 ]
    84.   LCB_Setup()
      5 U: H! ^8 H. T& G

    85. 9 u/ |/ D" @1 O+ s
    86.   ; cannot have a global transaction if we want undo to roll back each operation) D# a" |7 j- v/ e" K6 K7 Q: V

    87. 0 e0 z3 e3 x% s& D* b
    88.   LCBnotDone = t7 r0 w/ U9 t) |# i
    89.   doMark = 'undoMark# I' J& L+ p' ?. s1 z6 i
    90. : Q+ {/ n! ]2 X: ]3 i9 g
    91.   while(LCBnotDone
      - ^# V8 o0 ?5 R) @5 e
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))
      8 P7 j, }3 T1 i: U0 U: v
    93. 4 {* X) v. k+ g# `+ _
    94.       ; need to do a start/commit for each operation if we want undo to * U" s( a9 f5 @" G: N) F2 K
    95.       ; rollback each change. This mostly disables Oops
      9 _$ O. H" N# U# w* o$ u4 w6 D8 Q, f" C
    96.       ;          don't want to start a transaction unless we have work to do or it will
      - i4 l# d% `- l% B% C- X
    97.       ;   do a unneeded undoMark.
      9 F9 ?: h2 U' G/ u: O* y1 X
    98.       when(lclines 3 q, W6 W6 F8 ~. Q
    99.           LCB_mark = axlDBTransactionStart(doMark); H, P4 w+ s9 f" g$ N7 w
    100.       )
      ; }# l9 q0 u) D
    101. # H* Y( y; ?6 u  r& n! M7 S1 i
    102.       foreach( clinedbid lclines0 G5 d( J4 o6 q0 Y, u. a
    103.             layer = clinedbid->layer
      - A! @  A" [5 Y* c  f. d
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      . o' R/ F% c$ R# f4 U% _
    105. . [3 W1 R! E9 V9 y/ Q% D
    106.             axlDeleteObject(clinedbid)
      ( D: ~5 `) v& z/ F$ D- Z+ Q$ ^% t
    107. ( C6 a0 }& K# Y1 L
    108.             unless( axlDBCreateShape(car(polydbid) t layer) , W9 S2 K" o- a0 v$ b
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      $ o$ S5 \1 U- S- P3 Y7 Q7 {
    110.             )1 a+ E1 O! I% C2 K" O7 Z
    111.             when( cadr(polydbid) % L6 l' D% I0 [9 g% N0 Y2 z
    112.                 axlDBCreateShape(cadr(polydbid) t layer) ' |7 S$ p  t8 e" d. X
    113.             )+ K3 W# W. O7 p. X/ k
    114.      )8 c7 {* m2 N/ m) I
    115. 7 x3 O" K2 m4 D& u1 C
    116.      ; marks are only required if undo is using rolling back all database changes) z# p" v! j$ a# e8 k
    117.      ; when command is active. When undoing each conversion this is not needed% D+ N" Y( I" \) O8 |" {; l) v
    118.      ; nor is Oops functional.
      $ s6 @: Y- i0 _! [8 H6 E  \% r6 Z
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))
      7 z9 X/ V2 y! \: f
    120.      LCB_mark = nil
      0 X, b! `& M$ {' W
    121.   )
      5 }. |! Q( }% I) @$ t+ {7 I) k
    122.   LCB_Done() ; just in case
      4 m3 n* A/ I( g2 D, ~& ~4 k( ?
    123. ))# j% h) J1 B, O1 h& E

    124. , i, p6 r' A$ A. n& d

    125. % L- s% v" ~' f# Z3 B" t
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      4 L! ^; P0 H9 Q$ T5 P" T* H
    127. ;; support APIs- z& Z. V) y* q% @/ q

    128. 8 ^5 ^# ~4 W) ~) `( r( Q
    129. procedure(LCB_Setup(). X# l3 E, K. o" N3 e, E
    130. let( (popup)
      5 e+ z0 _; V+ E  Q  [
    131.   axlSetFindFilter(?enabled list("noall" "clines")
      ( x. n# k7 c' o3 _
    132.                   ?onButtons list("noall" "clines")): E1 B. a. @% x( h: Y

    133. & e! a4 }1 k: |  N
    134.   popup = axlUIPopupDefine( nil (list9 f. f$ Q! F) p# }% n) A* b
    135.     (list "Done" 'LCB_Done)
      ) e2 v9 R: G8 `% c# N
    136.     (list "Oop" 'LCB_Oops)6 `. Z( D4 K* v* A3 Y& |' y+ U
    137.     (list "Cancel" 'LCB_Cancel)
      0 T3 |/ Z& r0 Q7 A( w  |
    138.      ))
      1 S* Y  }% a6 }6 q$ ~( L

    139. . E6 r" V- \) A) Q, `2 t
    140.   ; Snapping is not required by this command but this shows the ability0 Z2 |4 S* |+ R3 ^& L) `) Q
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu: m; ^! R; N4 o$ Z
    142.   axlSnapEnableAtRMB()
      & C$ p) }. [3 }4 F/ m& i5 d
    143. 2 O! H6 L0 N# ~/ C
    144.   axlUIPopupSet(popup)
      % h! [6 a7 X8 O: i3 p5 @
    145.   LCB_mark = nil
      . V1 F/ X" d4 i. m
    146. ))
      ) y: E) r% b  |! c: ?
    147. 3 n6 Y* M" z  Z% U8 n) K( t
    148. procedure(LCB_Oops()
      ( z7 S9 Z8 q2 F) d
    149.   when(LCB_mark/ R! c- O- g& g
    150.     if(! axlDBTransactionOops(LCB_mark) then
      ; {' [8 u( V1 h2 z4 g; J1 g! `
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --")
      3 M/ e8 K  i4 W' G4 i
    152.     else
      . M, e# A) J  M4 Y' ]
    153.       axlUIWPrint(nil "-- Replacing Clines. --")( R9 i" W, e+ E+ p0 V
    154.     )
      ; j2 B& |% A3 |* H
    155.   )
      4 B) c. p" p5 Z! W
    156.   axlClearSelSet()1 [. p: G. N' P! ?4 w8 V, Y- m
    157. )
      " d" X3 a1 u8 u& F

    158. ! v) h8 E  F9 f$ Y
    159. procedure(LCB_Cancel()7 w0 `3 d; q  N+ s
    160.   axlUIWPrint(nil "** Cancelled Program. **")' W4 a$ u& V& c  d  E: s" g
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark))
      + g! t+ J$ A7 P) O
    162.   ;LCB_mark = nil- y4 q% p6 p9 z8 L
    163.   LCBnotDone = nil3 k* Z5 P) Y( [
    164.   axlClearSelSet()* V! h4 J# u/ ]8 [* W3 X' t# v; F
    165.   axlCancelEnterFun()8 J1 ^& s4 T9 C0 w
    166. )! B! B6 N( ^; f0 M% p6 D& _2 s
    167. : @( @( G4 f. [, h/ H0 p) L; M

    168. / V' C% [% Q9 c) y! W
    169. procedure(LCB_Done()! a2 c% J9 r! X8 O6 U- g. Z
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark))
      : w/ R  @! l2 V" O
    171.   ;LCB_mark = nil
      . u1 R: c8 @0 M( |6 e
    172.   LCBnotDone = nil, j4 w) [( k3 N* C* F, }5 N
    173.   axlFinishEnterFun()7 @) i3 x; m. u* g$ e' B! q. M
    174. )& w" }& ~' f" g) I- K8 X4 p+ a
    复制代码

    点评

    删掉也不行,还是报错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& a, _4 s" Y1 a% M. z
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    0 R! x4 @0 ^) j; z8 F1 [3 D
    删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)3 |' t3 T& w& M1 s: W

    该用户从未签到

    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 z% i& ]  U4 ^8 |0 R+ R7 p
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。
    " {2 F. U/ \/ i5 ~
    学习了4 j: r0 B. E4 p, U3 u+ i0 A

    点评

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

    该用户从未签到

    7#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:000 i2 E, X$ ?$ ^/ T8 q! E- Z( ]# f$ l
    学习了

    . K: t) i& E& q7 J请问16.6有这个功能吗/ }7 q. s* `% Z" C+ V

    点评

    新版本有,我用的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
    5 V4 G5 a6 g: h请问16.6有这个功能吗
    0 k8 [9 `5 E) f5 Y2 \' s
    新版本有,我用的17.2
    " }( _, s) ~" |( F4 v

    该用户从未签到

    12#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来+ N8 x, G- i3 k

    该用户从未签到

    13#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21* D, b: e( v: Y' X, \3 P: x
    allegro productivity toolbox
    : M! n4 ]; X, [4 y: [
    請問是在哪裡呢? 我的沒瞧見
    ! _' r- `; |. C, j2 R. S

    该用户从未签到

    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:16) f7 I( C- z9 I3 `* [) F2 x
    16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...

    ' u5 T" d! }8 i; N这个15.X版本就已经有了的。不过还是感谢回答。
    % H" E/ _5 S2 m7 S

    该用户从未签到

    16#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:161 T2 t) b- l0 @5 ?" V0 g
    从16.6开始就有了

    $ l8 Y9 h3 p% g4 S; K; a* @( O# o2 U我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!
    4 ~% j/ c+ w) }1 ^. ^

    该用户从未签到

    17#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16( f9 H) f2 o% F& E7 l9 q0 t6 w% A
    从16.6开始就有了

    4 {6 ?3 P" h  V. {8 z. `3 p是不是需要再打个补丁?
    6 S$ [, y+ t8 B. e5 o

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

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-10-11 06:11 , Processed in 0.187500 second(s), 39 queries , Gzip On.

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

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

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