Home > Community > Forums > PCB SKILL > Backslash path gives error in axlUIViewFileCreate with allegro_html enabled

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

 Backslash path gives error in axlUIViewFileCreate with allegro_html enabled 

Last post Mon, May 7 2012 3:32 AM by pcbnagaraj. 3 replies.
Started by pcbnagaraj 25 Apr 2012 01:47 AM. Topic has 3 replies and 2273 views
Page 1 of 1 (4 items)
Sort Posts:
  • Wed, Apr 25 2012 1:47 AM

    • pcbnagaraj
    • Top 150 Contributor
    • Joined on Mon, Dec 5 2011
    • bangalore, Karnataka
    • Posts 55
    • Points 1,130
    Backslash path gives error in axlUIViewFileCreate with allegro_html enabled Reply
    Dear All,

    I am trying to show a html file to user using the axlUIViewFileCreate

    file path is like \\server1\allegro_skill\tips.htm

    I enabled the allegro_html env variable so that the page is displayed as html page.

    The above file path is stored in Allegro_site variable

    Mycode is as below

    Filename = strcat(axlGetVariable("Allegro_site ") “\\tips.htm”)  ; this returns the file path

    axlUIViewFileCreate( Filename "Allegro TIPS" nil)


    this gives error that the file path is not found – reason is the double backslash appears in the Filename(\\\\server1\\allegro_skill\\tips.htm) which is not executed by axlUIViewFileCreate with allegro_html env.

    I know that the double\\ is equal to \ and the strlen(“\\”) will count as 1.

    When I unset the allegro_html I can able to read the file but the htm files is shown as text file with html syntax codes. I want the output to be as html enabled to show some links and pictures to the user.

    How do I convert the double backslash(\\) to single backslash(\). I searched in the forum suggested to use rexSubstitute – I am not sure how to use this function.

    Tried the axlOSSlash also doesn’t help. //server1/allegro_skill/tips.htm is not executed by axlUIViewFileCreate with allegro_html env.

    Any suggestion is much appreciated.

    Thanks,

    Nagaraj.

     
    • Post Points: 20
  • Wed, Apr 25 2012 8:55 AM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 9,965
    Re: Backslash path gives error in axlUIViewFileCreate with allegro_html enabled Reply

    Hi Nagaraj

    I don't know how you can get axlUIViewFileCreate to work on this, but have another suggestion

     Filename = strcat("http file:" axlOSSlash(axlGetVariable("Allegro_site")) "/tips.htm")

     axlShell(Filename)

    That will open the link in the users preferred browser - that works :-)

    Best regards

    Ole

    Best regards Ole
    • Post Points: 5
  • Wed, Apr 25 2012 7:38 PM

    • pcbnagaraj
    • Top 150 Contributor
    • Joined on Mon, Dec 5 2011
    • bangalore, Karnataka
    • Posts 55
    • Points 1,130
    RE: Backslash path gives error in axlUIViewFileCreate with allegro_html enabled Reply
    Thanks good trick.. excellent!!

    The issue with the axlUIViewFileCreate is the first // in the server name. C:/tips.htm though works.

    Thanks,

    Nagaraj.
    • Post Points: 5
  • Mon, May 7 2012 3:32 AM

    • pcbnagaraj
    • Top 150 Contributor
    • Joined on Mon, Dec 5 2011
    • bangalore, Karnataka
    • Posts 55
    • Points 1,130
    RE: Backslash path gives error in axlUIViewFileCreate with allegro_html enabled Reply
    Just to inform – axlHttp will  directly launches to IE instead through shell command.

    Thanks,

    Nagaraj.
    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by pcbnagaraj at 25 Apr 2012 01:47 AM. Topic has 3 replies.