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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
本帖最后由 promissingwh 于 2019-1-2 15:43 编辑
3 M: w9 {9 t' U$ N
. @" X! Z5 q3 o7 O( y2 q% C/ e( [有没有cline to shape的skill,帮忙分享一个。谢谢。2 s! E; E" U) l- s
我在论坛上找到的,运行命令后,会出现:3 j7 H. B; v  `. C; y+ _
W- *WARNING* (axlDBCreateOpenShape): Invalid database id argument - dbid:removed" e& j" I  i/ C/ u" Y5 v+ o/ l! g

5 z3 b! m& m/ K6 q( h
  • TA的每日心情
    开心
    2024-2-21 15:59
  • 签到天数: 313 天

    [LV.8]以坛为家I

    推荐
    发表于 2019-1-2 15:50 | 只看该作者
    Allegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。& J: r  x3 x! H1 K2 b, q! c

    点评

    学习了  详情 回复 发表于 2019-1-4 10:00
  • TA的每日心情
    慵懒
    2025-8-25 15:23
  • 签到天数: 85 天

    [LV.6]常住居民II

    推荐
    发表于 2022-2-18 11:54
    16.x及之前的版本需要把出现的两个“?undo t"删掉。
    9 \9 S, H, P' J- I7 W, j6 e
    2 ^; l/ r# x  Y; t
    1. ;###############################################################################
      0 g; t" J/ |# ~9 ^
    2. ;                                                                              #2 i. O5 u* ~9 K7 e! R
    3. ;                      Command: cline2shape                                    #0 ^, v3 _: y! I; [/ |
    4. ;                   Skill File: cline2shape.il                                 #
      ' A# x( B$ f" I$ H/ m
    5. ;               How To Execute: Command> cline2shape                           #
      , a, s$ }) j. Z' U1 H) }1 w% l0 h
    6. ;                                                                              #
      : i$ e5 U  \, I4 s. _1 T! e3 t
    7. ;  DISCLAIMER:                                                                 #
      $ b2 s' K7 V, {" e! S) T
    8. ;       The user of this command assumes all responsibility and does not       #
      / g8 Q  ^/ F( p; c0 N
    9. ;       hold Cadence Design Systems nor the author of this code for any        #" C) S# `7 n8 |
    10. ;       unwarranted results or problems due to the use of this code.           #0 y0 f8 u  @" K6 h: x7 o+ o. C& Z  j
    11. ;                                                                              #: e/ [! Z4 e2 }7 L' ]) I
    12. ;       This is non-supported code and the user may modify it as needed.       #3 k- q, X: Q) X8 A; E  d6 S0 e0 P
    13. ;                                                                              #. K& e/ x+ A$ _8 u# X0 ^0 n
    14. ;###############################################################################, Y2 O$ R* h* z- Z: H! _

    15. 4 X* k+ d: I8 r! ^
    16. ; demostrates6 [3 Q$ n6 N5 m7 o% x
    17. ;        1) style for an interactive command6 h  s5 a$ `! V' |0 r3 v8 @# J
    18. ;        2) use of the database tranasction APIs
      - t- s4 Y- V" X. E$ @
    19. ;        3) two styles of undo/redo support# y1 h" H$ N. W. i5 E) ~
    20. ; Added undo support3 R' ]. w' e9 h0 c; j
    21. , \4 u( h, C4 q0 ~* }3 j
    22. ;  Know Bug: Sometimes the program will not convert all cline segments but it " |4 L5 Q& c9 i% n8 x
    23. ;            will DELETE all segments.  Use at your OWN discretion!: L0 L7 O7 b6 k+ H: T
    24. ;            Select Cancel or Undo before exiting the command to restore  7 ]& Y  D& m( T8 a* t1 p4 W
    25. ;            to original Clines.
      3 P1 s7 G( o! w5 d' h$ H8 I( k9 u) |

    26. / ?: c5 u$ V) e2 x1 k1 A( K
    27. " L4 G) w: o2 U

    28. * @% D2 D3 l3 F8 Y

    29. / F" p' q, b8 Y* I
    30. axlCmdRegister("cline2shape" 'LCB_cline_to_shape ?cmdType "interactive"4 ^6 o/ g4 y- F, Y' Q* y# a
    31. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)
      % `8 K8 X# J. l3 P) D9 C
    32. axlCmdRegister("cline2shape2" 'LCB_cline_to_shape2 ?cmdType "interactive"
      1 q; n$ d1 T: t  U6 _$ ^( j
    33. ?doneCmd 'LCB_Done ?cancelCmd 'LCB_Cancel ?undo t)8 v' F) k* F4 q( w

    34. 7 ^8 j' W% T, _3 p7 |5 Y0 U
    35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      5 n: a" L1 {9 K/ ]
    36. ; This shows undo where all of the conversions that this user does while
      9 D# r$ q5 k4 X$ k
    37. ; in the command a undone as a single operation.
      $ T  [  J+ f& E% Q* x' @$ ?2 ^
    38. ;        To convert an existing command to support undo this method is2 G( J8 K# v# c1 {: d" d+ h7 t
    39. ;        typically easier.$ X) i$ T: L: h, j1 d5 ]7 i+ P

    40. ) w* A9 r( B# A1 |6 v9 W
    41. procedure(LCB_cline_to_shape()- t% O4 v$ ]% @! A
    42. let( (lclines layer polydbid )8 \& w2 n4 M6 `" {& `' N
    43. / K& M% H+ {/ B
    44.   LCB_Setup()1 M" l+ p3 Y& ?, {! Q' Q& T

    45. , P7 r* \. i( D" U) m7 v1 }8 u
    46.   ; cannot have a global transaction if we want undo to roll back each operation
      " {" Q# K) {; A) i8 _2 r0 H
    47.   LCB_mark = axlDBTransactionStart()
      1 |3 r1 D" L9 s$ D
    48. + S) k1 i% v5 G! ]# h
    49.   LCBnotDone = t
      ( ?- ~& R! H) }  M9 F& r
    50.   while( LCBnotDone
      3 K% w3 }. z' v, _3 H( r$ I5 Z, S  C
    51.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))+ E2 q; T3 W# A- k' D6 M; P/ s
    52. + y& v/ w5 ^4 u: e
    53.       foreach( clinedbid lclines
      1 Y/ U& q' ~! X- n8 o  W7 L5 W8 C; O
    54.             layer = clinedbid->layer# E, W' F/ C0 S  |3 h4 }
    55.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      2 ?% R! C& V+ k0 ?$ R

    56. * _3 B7 v0 J$ b' n' N; _' r. ~- s
    57.             axlDeleteObject(clinedbid)
      ) u- R- c1 _; |! c' M# g# |

    58. . n- o2 O: b3 [
    59.             unless( axlDBCreateShape(car(polydbid) t layer)    b( Z4 o0 q" j' _5 V
    60.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline."). m' X9 q8 Q1 \3 V. o3 f
    61.             )
      $ R- R- M" R7 B
    62.             when( cadr(polydbid) ! v& q; r& P. n; h0 |' X$ c! y; I
    63.                 axlDBCreateShape(cadr(polydbid) t layer) 7 Q) [2 p- ?+ J9 U. g0 n  _: y" _
    64.             )
      9 @) i0 w* E2 H5 E! Y1 u' M
    65.      )
      : l0 O( {# O7 M$ a6 D

    66. 1 Q$ A+ b. B; v. e7 ^) A3 s
    67.      ; marks are only required if undo is using rolling back all database changes
      3 J3 w! L% m& k' F( N: O
    68.      ; when command is active. When undoing each conversion this is not needed5 O& h% X2 m2 f+ U# E* ?
    69.      ; nor is Oops functional.) O* u8 u# r% E% N! G
    70.      when(LCB_mark axlDBTransactionMark(LCB_mark))+ ^( t2 I8 f. ~& @! Q! Y0 }6 j
    71.   )3 a  z' q' _0 ]# y
    72.   ;LCB_Done() ; just in case
      ; v7 B: N8 `0 l3 k6 `
    73. ))! ^7 s9 W& s- d- t% d& U# D
    74. 3 j; y) N+ R5 `" d6 Y) R" f
    75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7 i# y7 x2 `# f" _% a$ r! q
    76. ; This shows undo where each conversion is supported as seperate undo operation
      0 Y' |: w1 }( K
    77. ; in the command a undone as a single operation." y( p2 r( R1 x* {% t3 G' ?
    78. ;        To convert an existing command to support undo this method is
      ) R9 r& x7 c7 G) R
    79. ;        typically easier.! F% H$ v& {! E# S
    80. $ L) ]) s) ~" G8 v
    81. procedure(LCB_cline_to_shape2()
      0 y3 l- d0 ], F% c3 q' t
    82. let( (lclines layer polydbid doMark )
      % U1 X3 b- u, @# R9 ~2 }* W

    83. 1 c' D5 ~: y  @) j& d% e
    84.   LCB_Setup()
      & y. B5 t( k) \$ j& c

    85. * P0 D% N) {! L/ l$ v5 {
    86.   ; cannot have a global transaction if we want undo to roll back each operation
      5 ~6 v$ g: M4 M* ]% W- ?

    87. / o1 E  D) ?' O4 n4 t# x2 e
    88.   LCBnotDone = t  E( p7 j* N  x( p) X( a9 @+ y
    89.   doMark = 'undoMark
      , d) d9 Q* ~7 @0 F. P6 `9 [

    90. + T: q# v$ S5 U5 t
    91.   while(LCBnotDone4 H; e: }1 T' T0 n( v# S
    92.       lclines = axlGetSelSet(axlSelect(?prompt "Select Clines to convert to a shape."))+ @2 o6 l) S1 D2 |/ y  I" W

    93. " T- z) Q- H" q5 r, T
    94.       ; need to do a start/commit for each operation if we want undo to / e# c9 u- b+ w2 N+ N% D. L! ^4 ~
    95.       ; rollback each change. This mostly disables Oops
      ) \) o% a$ ]% D8 b# o7 R; B
    96.       ;          don't want to start a transaction unless we have work to do or it will8 m- n. |1 Q- ]: c: f
    97.       ;   do a unneeded undoMark. " _8 c$ B3 b) J5 j5 C* L4 F3 a
    98.       when(lclines ( z. h* Q% _5 J$ }# q1 U3 o& D
    99.           LCB_mark = axlDBTransactionStart(doMark)5 L2 ?; H! V# w/ G% R
    100.       )
      2 ]0 {2 E8 t0 M( ?

    101. # C5 u2 S4 V; w9 o
    102.       foreach( clinedbid lclines3 f) a* w4 X# {/ }9 E2 T7 i
    103.             layer = clinedbid->layer" ^* w2 q5 ]$ Q2 |; v
    104.             polydbid = axlPolyFromDB(clinedbid ?endCapType "ROUND")
      ) ~/ q/ w! W% y/ s" f

    105. 9 E. q% P0 ~! @8 a, `8 T
    106.             axlDeleteObject(clinedbid)2 `8 k) J+ B! Q+ y& q2 |0 ?' S
    107. . Y- q: C  n( e, U5 }
    108.             unless( axlDBCreateShape(car(polydbid) t layer)
      , I% l0 {. m! ~7 ?( ]
    109.                 axlUIWPrint(nil "ERROR: Failed to create Shape from Cline.")
      . Y5 i. p0 E9 y7 d- r$ @# l! ?
    110.             )
      6 |5 ]. [" w9 }1 R! N7 W
    111.             when( cadr(polydbid)
      + D* O! K/ J9 x7 a
    112.                 axlDBCreateShape(cadr(polydbid) t layer)
      0 L* M0 k$ c) [
    113.             )
      0 I. m+ l5 p2 \. W3 O' Z3 P! w
    114.      )
      ! k% ^- k  T, ^7 }

    115. 8 B$ }2 y, `7 ~* V/ z' X
    116.      ; marks are only required if undo is using rolling back all database changes, \# @5 D& }/ K7 E* R
    117.      ; when command is active. When undoing each conversion this is not needed
      " s' w* t3 _, h0 g
    118.      ; nor is Oops functional.
      ( t; u. @3 O: g
    119.      when(LCB_mark axlDBTransactionCommit(LCB_mark))$ E$ {* ?# g" I6 B
    120.      LCB_mark = nil
      - S7 e& {: G0 C! I" O2 C. h; u6 |
    121.   )
      # c) f8 F, [* l+ i# Y3 P5 t
    122.   LCB_Done() ; just in case- {. @1 M3 P! a: l
    123. ))
      % B8 F8 B  }2 _7 Z& l2 O

    124. - `0 h7 [3 y$ M4 p) X, [$ u8 z

    125. / ], b; {% t/ N
    126. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;: w5 Y3 A# g/ m, r1 t3 M
    127. ;; support APIs5 e' @+ K: D+ q8 x
    128. 5 [1 g: Z* H. M: o  S' L7 e/ r% z" d/ t
    129. procedure(LCB_Setup()8 u( y  t0 ~0 F, d& i( q
    130. let( (popup)4 X5 i3 }  X; l
    131.   axlSetFindFilter(?enabled list("noall" "clines")
      # ?' g/ @8 u9 ^/ P1 I9 v  M5 j
    132.                   ?onButtons list("noall" "clines"))
      % F$ n: B; F: q# I2 O
    133. 9 f  g2 Q9 C) H: }' _+ l$ [
    134.   popup = axlUIPopupDefine( nil (list
      - \6 r& S3 N: K+ p- c
    135.     (list "Done" 'LCB_Done)9 U5 w3 h/ b4 b
    136.     (list "Oop" 'LCB_Oops)6 l( b( L9 l7 l6 N6 D
    137.     (list "Cancel" 'LCB_Cancel)
      . ~5 ~+ s  e+ I' L9 y
    138.      ))% `! _% A3 }9 s
    139. ! m3 U$ S% @2 C& D; S
    140.   ; Snapping is not required by this command but this shows the ability
      3 e* Q& S/ y3 x: }& B; l' Z2 x+ M
    141.   ; to add the snap sub-menu to the Right Mouse Popup menu
      0 B$ h6 Y$ G8 l5 e" c
    142.   axlSnapEnableAtRMB()
      4 H% @$ _- A  A  F# y* F3 E9 R

    143. 1 c$ C) n" w& ~+ b+ U8 Z
    144.   axlUIPopupSet(popup)
      ) V% E" k8 t6 v$ c: o8 U
    145.   LCB_mark = nil- c4 n8 P1 D) u% T  S7 U. |
    146. ))
      & Y( X5 Y# r, G% `9 {3 F7 T3 o
    147. ( t( ^4 Q5 u% x2 |8 O
    148. procedure(LCB_Oops()( W& ~& A( z! d. }# U' K7 e
    149.   when(LCB_mark
      ) q4 V8 P# X# K. q9 H
    150.     if(! axlDBTransactionOops(LCB_mark) then6 a/ g& r' T" H- Z$ i
    151.       axlUIWPrint(nil "-- Nothing Left To oops. --")$ @+ x$ D3 u/ b  A; B& |
    152.     else  ^; O9 q, a6 ~
    153.       axlUIWPrint(nil "-- Replacing Clines. --")
      3 g( Q9 u7 k  ~* b- Y6 v6 R0 v
    154.     )- }8 C( S# O1 l' U3 @
    155.   )
      ; p2 K8 ~" ]# q2 f0 r  Y
    156.   axlClearSelSet()$ }% R  L6 X3 E
    157. )3 S6 t) R0 a/ c: c1 t& f

    158. - V' b; I- R& k1 ?* z4 R
    159. procedure(LCB_Cancel()
      1 w; P# z; W) Z3 k. r
    160.   axlUIWPrint(nil "** Cancelled Program. **")# K# d8 V/ B; \7 J! A$ O
    161.   when( LCB_mark axlDBTransactionRollback(LCB_mark))7 X& h- P, B+ c9 {- n1 ^
    162.   ;LCB_mark = nil2 i8 d2 }) X1 Q" l( h( e7 \
    163.   LCBnotDone = nil
      - p4 B+ X  a2 c
    164.   axlClearSelSet()5 d2 R8 h1 `) f! P' g7 s, W
    165.   axlCancelEnterFun()
      # Y' Z- h% X/ W) @/ e! {% N9 a( T
    166. )+ C) Z* T, P& [6 j

    167. 7 ^: P2 A: P. ^0 O% I% r2 i( {
    168. 2 ]4 e9 h. V+ h  ?1 f5 b
    169. procedure(LCB_Done()
      - \% k2 Z3 B% o7 n# [# ~- E
    170.   when( LCB_mark axlDBTransactionCommit(LCB_mark))
      : }, ^* t4 T. V- T7 W4 F7 ]
    171.   ;LCB_mark = nil8 K' G  x1 v6 d2 m& {! Y
    172.   LCBnotDone = nil: r+ u2 F. O- M6 u
    173.   axlFinishEnterFun()
      ) y* |. y4 e$ I( b, k, h! E+ s$ L
    174. )
        x3 v' X; ?9 \
    复制代码

    点评

    删掉也不行,还是报错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
    9 q. W, w% c& X% W* S! ~16.x及之前的版本需要把出现的两个“?undo t"删掉。
    $ @: A9 t+ w% S9 a" H4 v& B" _
    删掉也不行,还是报错E- *Error* axlDBTransactionStart: too many arguments (0 expected, 1 given) - (undoMark)
    , P1 G2 B6 b5 H

    该用户从未签到

    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
    & z8 N/ n! h' W8 \5 U% ?# pAllegro自带了这个功能,启动时打开Toolbox选项,Edit->Cross Copy功能就能实现了。

    4 [$ \. b5 P- O学习了
    0 q# J& K% J* _

    点评

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

    该用户从未签到

    5#
    发表于 2019-1-4 10:14 | 只看该作者
    owenli520 发表于 2019-1-4 10:00# }7 u( F! r; c% n; |0 \8 q" @: _
    学习了
    ( }8 |9 ]- g0 I4 Q' ~7 f  @
    请问16.6有这个功能吗( `% M) o% e% ?# J, A

    点评

    新版本有,我用的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:14
    ' U! ?4 y( w3 U0 o请问16.6有这个功能吗

    . I2 J9 V# |! D: ^$ i2 e8 `/ F# a新版本有,我用的17.2
    " i6 R  Z7 O! b" j

    该用户从未签到

    10#
    发表于 2019-1-4 15:57 | 只看该作者
    新版的功能学习起来5 n  N) ]9 L; N

    该用户从未签到

    11#
    发表于 2019-1-8 18:51 | 只看该作者
    13349852893 发表于 2019-1-4 11:21
    - x" C+ O. `% y8 S- Fallegro productivity toolbox

    ) j3 F3 M* S. Y7 M5 b請問是在哪裡呢? 我的沒瞧見
    & ]0 c1 @1 i: ~8 ], R. r5 b" \

    该用户从未签到

    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
    7 Q/ R6 G* m& y$ G8 B# y" V# P: d16.6版本 shape栏有个compose shape 选中后,在optins 选项栏中 设置好你要的shape图层属性。在finds中只勾 ...

    4 g% d6 A4 s; d# o% V这个15.X版本就已经有了的。不过还是感谢回答。* k6 L4 P3 H& R4 j: e1 I

    该用户从未签到

    14#
     楼主| 发表于 2019-1-9 17:32 | 只看该作者
    dzkcool 发表于 2019-1-4 10:16$ r- `! Y+ k) f, u( n7 ~+ ?
    从16.6开始就有了

    4 z( J9 k7 m1 ]5 S: i我哪儿都找不到toolbox,请问在哪里可以打开?麻烦告之,谢谢!
    ! Y4 m# k8 a# |# w6 a/ w

    该用户从未签到

    15#
     楼主| 发表于 2019-1-9 17:37 | 只看该作者
    dzkcool 发表于 2019-1-4 10:169 {* E# V0 O. H+ b
    从16.6开始就有了

    ( Z" \* n* i: A+ b2 m% ?% `是不是需要再打个补丁?
    0 H! v$ u/ d" i6 q" X. Z  H  `

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

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

    本版积分规则

    关闭

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

    EDA365公众号

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

    GMT+8, 2025-9-10 21:51 , Processed in 0.187500 second(s), 38 queries , Gzip On.

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

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

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