Home > Community > Forums > Digital Implementation > Tcl Scripting encounter

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Tcl Scripting encounter 

Last post Mon, Sep 4 2006 9:03 AM by archive. 3 replies.
Started by archive 04 Sep 2006 09:03 AM. Topic has 3 replies and 2114 views
Page 1 of 1 (4 items)
Sort Posts:
  • Mon, Sep 4 2006 9:03 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Tcl Scripting encounter Reply

    Hi all,

    I'm developing custom tcl scripts in Encounter for block floorplanning.
    I can't execute the addStripe command with variables as "area parameters"

    Example:
    addStripe ....  -width $wid ......  -area{100 200 500 1000}......              is OK

    but
    addStripe ....    -width $wid  ...  -area{$inita $initb $initc $initd }......   doesn't work

    I guess  the problem comes from the curly brackets because the $wid is applied
    but the extension of the stripes is totally wrong.

    Can anyone help me?
    Bye



    Originally posted in cdnusers.org by giohdl
    • Post Points: 0
  • Mon, Sep 4 2006 2:11 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Tcl Scripting encounter Reply

    change you -area{..}

    to -area [list ${x1} $[y1} ${x2} $y{2}] should fix your problem.

    li siang


    Originally posted in cdnusers.org by lisiang
    • Post Points: 0
  • Sun, Sep 10 2006 9:07 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Tcl Scripting encounter Reply

    Hi Giohdl,

    Not sure if the following can work, but worth trying as it illustrate an important property of TCL:

    addStripe .... -width $wid ... -area '$inita $initb $initc $initd "......

    Please refer to a TCL book on the amazing differences between {}, "" and [], if not you might run into this type of problem again!. Basically, anything inside {} are taken "as it is", so what TCL see is the number "$inita $initb $initc $initd" which of course is invalide. For LiSiang soluation, the [] force the TCL parser to do an "re-evaluation of the expression". For "", the tool do variable subsitation.

    Regards,
    Eng Han


    Originally posted in cdnusers.org by EngHan
    • Post Points: 0
  • Mon, Sep 11 2006 6:36 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Tcl Scripting encounter Reply

    Hi,
    Your solutions are OK.
    This way any list of {coordinates} in
    Encounter commands can be replaced by variables.

    Regards,
    Giohdl


    Originally posted in cdnusers.org by giohdl
    • Post Points: 0
Page 1 of 1 (4 items)
Sort Posts:
Started by archive at 04 Sep 2006 09:03 AM. Topic has 3 replies.