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: *

 box selection 

Last post Mon, Jan 7 2013 11:17 PM by nannasin28. 6 replies.
Started by smachha 24 Dec 2012 09:20 AM. Topic has 6 replies and 1156 views
Page 1 of 1 (7 items)
Sort Posts:
  • Mon, Dec 24 2012 9:20 AM

    • smachha
    • Not Ranked
    • Joined on Thu, Apr 15 2010
    • Posts 14
    • Points 220
    box selection Reply

    Hi all,

    I am writing a script in tcl that take bbox co ordinates from the command line arguments.

    But i want  to improve it by adding a function in the script which prompts the user to click/drag the mouse.

    can some one help me which function in EDI does that.

     

    Thanks,

    Sunil 

     

    • Post Points: 35
  • Mon, Dec 24 2012 10:26 AM

    • jgentry
    • Top 150 Contributor
    • Joined on Thu, Sep 11 2008
    • Fort Collins, CO
    • Posts 51
    • Points 1,185
    Re: box selection Reply

    You want to use the 'uiSetTool defineArea' command:

    proc getCoords {} {
      Puts "Pick the coordinates from the GUI"
      uiSetTool defineArea printCoords
    }

    proc printCoords {x1 y1 x2 y2} {
      Puts "Coordinates are: $x1 $y1 $x2 $y2"
    } 
    • Post Points: 20
  • Mon, Dec 24 2012 7:56 PM

    • smachha
    • Not Ranked
    • Joined on Thu, Apr 15 2010
    • Posts 14
    • Points 220
    Re: box selection Reply

    Thanks Jgentry,

    could you tell me in which doc/manual i can find "ui" commands.

     

    sunil. 

    • Post Points: 20
  • Mon, Dec 24 2012 8:21 PM

    • jgentry
    • Top 150 Contributor
    • Joined on Thu, Sep 11 2008
    • Fort Collins, CO
    • Posts 51
    • Points 1,185
    Re: box selection Reply
    Hmm, good question. I learned of most of the commands by looking in the 'gift' directory in the installation. 
    • Post Points: 20
  • Tue, Dec 25 2012 10:22 PM

    • smachha
    • Not Ranked
    • Joined on Thu, Apr 15 2010
    • Posts 14
    • Points 220
    Re: box selection Reply

    Jgentry,

    I tried your code, it is giving the co ordinates, but i dont understand which fromat they are in.They are not matching with the actual co ordinbates the design window is showing.

    Can help me how to convert them to microns.

    also any references to uiSetTool. I see the manual page for the uiSetTool but could't find the defineArea <mode>.

     

    Thanks,

    sunil

    • Post Points: 20
  • Tue, Dec 25 2012 10:48 PM

    • jgentry
    • Top 150 Contributor
    • Joined on Thu, Sep 11 2008
    • Fort Collins, CO
    • Posts 51
    • Points 1,185
    Re: box selection Reply
    The coords are returned in 'dbu' or 'database units'. These are integer values which are essential when doing any kind of scripting, namely coord value comparison. Like all scripting languages, Tcl also suffers the same failings of floating point math (104.1 != 104.1, trust me). To convert, use the dbDBUToMicrons command on each coord. 
    • Post Points: 5
  • Mon, Jan 7 2013 11:17 PM

    • nannasin28
    • Not Ranked
    • Joined on Mon, Jan 7 2013
    • <?xml version="1.0" encoding="utf-16"?><string>shenzhen, Guangdong</string>
    • Posts 10
    • Points 80
    Re: box selection Reply
    They are not matching with the actual co ordinbates the design window is showing.
    CR2032
    http://www.hqew.net
    • Post Points: 5
Page 1 of 1 (7 items)
Sort Posts:
Started by smachha at 24 Dec 2012 09:20 AM. Topic has 6 replies.