Home > Community > Forums > PCB SKILL > String returned from axlDMFileBrowse()

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

 String returned from axlDMFileBrowse() 

Last post Thu, Dec 13 2012 9:34 PM by VTAA. 4 replies.
Started by VTAA 09 Dec 2012 09:31 AM. Topic has 4 replies and 882 views
Page 1 of 1 (5 items)
Sort Posts:
  • Sun, Dec 9 2012 9:31 AM

    • VTAA
    • Not Ranked
    • Joined on Thu, Oct 16 2008
    • Santa Clara, CA
    • Posts 4
    • Points 80
    String returned from axlDMFileBrowse() Reply

     Hi All,

    Would you please kindly point out what did I do wrong in few lines of code below?

    My objective is to acquire file name of browser, pass it to IDF_IN fuction. My variable
    "file_name" is recongized by axlUIViewFileCreate() function but is not recognized
    by axlRunBatchDBProgram(....-d PTC) option. How should I handle that variable?

    Any effort is much appreciated.

       procedure(view_file()
       let( (emn_file file_name idf_result cur_db)
         file_name = axlDMFileBrowse(nil nil ?optFilters "MCAD file (*.emn)|*.emn")
         axlRunBatchDBProgram("My IDF in" "idf_in -o %s
                                              -d PTC file_name"
                                              ?reloadDB t)
         axlUIViewFileCreate(file_name "My EMN file" nil)
       )) ; end let, end procedure my IDF in 

    Thanks in advcance,
    Vinh Ta

    Filed under:
    • Post Points: 20
  • Sun, Dec 9 2012 11:16 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: String returned from axlDMFileBrowse() Reply

    Try this:

    axlRunBatchDBProgram("My IDF in" sprintf(nil, "idf_in -d PTC %s", file_name) ?reloadDB t) 

    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Dec 12 2012 9:09 PM

    • VTAA
    • Not Ranked
    • Joined on Thu, Oct 16 2008
    • Santa Clara, CA
    • Posts 4
    • Points 80
    Re: String returned from axlDMFileBrowse() Reply

    Hi Dave,

    Thank you for the solution, it works!
    Would you please point me to direction how to trap error returned from idf_in?

    Thank you in advance.

    Vinh

    • Post Points: 20
  • Thu, Dec 13 2012 4:58 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: String returned from axlDMFileBrowse() Reply
    You could try adding the ?logfile option to the axlRunBatchDBProgram command but I don't ever have much success with that.
    Dave Elder, Tait Communications
    • Post Points: 20
  • Thu, Dec 13 2012 9:34 PM

    • VTAA
    • Not Ranked
    • Joined on Thu, Oct 16 2008
    • Santa Clara, CA
    • Posts 4
    • Points 80
    Re: String returned from axlDMFileBrowse() Reply

    Hi Dave,

    Thank you for the reply.
    Your help is much appreciated.

    Vinh Ta

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by VTAA at 09 Dec 2012 09:31 AM. Topic has 4 replies.