Home > Community > Forums > PCB SKILL > Opening a text file in Allegro

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

 Opening a text file in Allegro 

Last post Fri, Jun 27 2014 6:58 AM by Ejlersen. 10 replies.
Started by eddieb1 09 Nov 2009 09:42 AM. Topic has 10 replies and 3834 views
Page 1 of 1 (11 items)
Sort Posts:
  • Mon, Nov 9 2009 9:42 AM

    • eddieb1
    • Top 500 Contributor
    • Joined on Thu, Jul 17 2008
    • Posts 20
    • Points 340
    Opening a text file in Allegro Reply

    Hi,

    Is there a way to open a text file in Allegro? Or if possible is there a way to place the text file in the "Show Element" window to make it active (hyperlink)?

     Here's my situation, I have a skill code written by somebody to look for a specific bend (angle) on a trace. Once found the x-y location of the trace and layer along with the netname is reported/written on a log file. Problem is, it's taking too much time to go and physically locate the bend. So if the skill reported 300 bends, then the only way to locate the bend is to copy the x-y coordinate from the report then use a 'line ' command with the x-y to go to the specific location.  If I can somehow place the report unto an active reporting window like the "show element" window then I think my problem will be resolved.

    Thanks in advance

    Eddie 

     

    Filed under:
    • Post Points: 20
  • Mon, Nov 9 2009 9:53 AM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Opening a text file in Allegro Reply

    You can use the File->Viewlog command from the pull-down menus, browse to the report file, then click on the x/y coordinates.  Of course, the x/y coordinates put out by the skill file would have to be formatted so Allegro recognizes them; i.e. "(100 200)".

    Good Day, R².
    • Post Points: 20
  • Mon, Nov 9 2009 10:03 AM

    • eddieb1
    • Top 500 Contributor
    • Joined on Thu, Jul 17 2008
    • Posts 20
    • Points 340
    Re: Opening a text file in Allegro Reply

    You Sir are a genius!

     Thank you very much for the super quick reply. Exactly what I was looking for (totaly forgot about this command).

     Much ablidge Randy!

    Eddie.

     

    • Post Points: 5
  • Mon, Nov 9 2009 10:26 AM

    • eddieb1
    • Top 500 Contributor
    • Joined on Thu, Jul 17 2008
    • Posts 20
    • Points 340
    Re: Opening a text file in Allegro Reply

    Hi Randy,

     Is there a code that I can use to open the text file? I would like to include/add this code to my existing skill so that it's part of the process instead of going to the "Viewlog" command.

    Thanks again,

    Eddie. 

     

    • Post Points: 20
  • Mon, Nov 9 2009 10:41 AM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Opening a text file in Allegro Reply

    There's a couple of ways you can try and see which one works better for you:

    axlUIViewFileCreate()

    or

    axlDMOpenFile()

    See algroskill.pdf in the doc folder of your installation for details on syntax.

     

    Good Day, R².
    • Post Points: 20
  • Mon, Nov 9 2009 10:56 AM

    • eddieb1
    • Top 500 Contributor
    • Joined on Thu, Jul 17 2008
    • Posts 20
    • Points 340
    Re: Opening a text file in Allegro Reply

    Thanks Randy for pointing me to this document. Shows you that I'm just learning skill.

    Anyway, looks like the axlUIViewFIleCreate might work for me but I'm not so sure how to proceed from here. Do you think I can use the example provided in the document? If not will you be able to show me?

    Regards,

    Ed

    • Post Points: 35
  • Mon, Nov 9 2009 11:27 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 291
    • Points 4,640
    Re: Opening a text file in Allegro Reply

     

     To open an existing file via skill do: axlUIViewFileCreate( "<filename>" "<filename>" nil)

         the second arg is the title for window while the 1st is the file to open.

    • Post Points: 20
  • Mon, Nov 9 2009 11:28 AM

    • Randy R
    • Top 50 Contributor
    • Joined on Wed, Jul 16 2008
    • Dupont, WA
    • Posts 192
    • Points 3,025
    Re: Opening a text file in Allegro Reply

    The example should work fine if your report is written to the working directory; otherwise you will probably need the full path.  Another difference might be the delete file option.  Depending on whether you want to keep the report file, you may want to set it to nil instead of t.

    Good Day, R².
    • Post Points: 5
  • Mon, Nov 9 2009 11:36 AM

    • eddieb1
    • Top 500 Contributor
    • Joined on Thu, Jul 17 2008
    • Posts 20
    • Points 340
    Re: Opening a text file in Allegro Reply

    Thanks Fx,

     Works! Simple and elegant.

    Much ablige to you gentlemen (Randy/Fx).

    Ed. 

     

    • Post Points: 20
  • Fri, Jun 27 2014 12:14 AM

    Re: Opening a text file in Allegro Reply

     Hi

    i know this is long time ago. But kindly let me know if you able to make the xy coordinates in hyperlink, so it will easy to jump to the exact location.

    Currently i m using the old technique to jump by line tool.

     

    Your reply will be appricaited.

     

    regards

    Arsalan Azhar

    arsalan20@gmail.com

    arsalan.azhar@altanova.com.pk

    • Post Points: 20
  • Fri, Jun 27 2014 6:58 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 556
    • Points 9,795
    Re: Opening a text file in Allegro Reply

    Hi

    If you write data to a file in the format (x,y) and open it in the html viewer it will automatically be a hyperlink

    Example

     

    fprintf(filehandle "Component located at (%f,%f)\n" xcoordinate ycoordinate)

    where both xcoordinate and ycoordinate are floating point numbers.

     

    Best regards

    Ole 

    Best regards Ole
    • Post Points: 5
Page 1 of 1 (11 items)
Sort Posts:
Started by eddieb1 at 09 Nov 2009 09:42 AM. Topic has 10 replies.