Home > Community > Forums > PCB SKILL > RE: Running bat files using axlRunBatchDBProgram

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

 RE: Running bat files using axlRunBatchDBProgram 

Last post Tue, Mar 24 2009 12:10 PM by eDave. 5 replies.
Started by Grungy Remnant 16 Mar 2009 09:44 AM. Topic has 5 replies and 2323 views
Page 1 of 1 (6 items)
Sort Posts:
  • Mon, Mar 16 2009 9:44 AM

    • Grungy Remnant
    • Not Ranked
    • Joined on Thu, Jul 17 2008
    • Ottawa, Ontario
    • Posts 8
    • Points 160
    RE: Running bat files using axlRunBatchDBProgram Reply

     Hi all.  I replied to this old archived thread ( http://www.cadence.com/Community/forums/p/7817/15686.aspx#15686 ) but it was burried so I decided to start a new one to bring it to the top.

     This was in response to Dave Elder's comments:

    Thanks Andy, I'll check out your ideas. Mye batch file runs OK but the redirect doesn't create a file.
    Why I don't like system calls: The system command opens a DOS window, albeit briefly, on the workstation. With multiple calls, this can be quite distracting to the user. Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
     
     

    So I'm wondering if anyone ever had a solution for this?  I too am trying to avoid the system command to avoid the pop-ups. Although I don't need to run a bat file.   An example is the following CVS command:

    command prompt:   cvs watched >cvslog     this works and redirects the output to the cvslog file

     

    skill:     system("cvs watched >cvslog")     this also works as expected, including the

    redirect, but you get the cmd popup briefly

     

    axlSkill:  axlRunBatchDBProgram("cvs" "cvs watched >cvslog")  The cvs command works but the redirect does not work.  The same thing will happen using a bat file.  Adding cmd.exe in the bat file doesn't help either.  (ie. cmd.exe cvs watched >cvslog )

     

    So are redirects just not possible with axlRunBatchDBProgram or am I missing something?

     

    Thanks for any info!!

     CJB

     

     

    • Post Points: 20
  • Mon, Mar 16 2009 11:46 AM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: RE: Running bat files using axlRunBatchDBProgram Reply

    FYI. I never resolved this. Please let us all know if you find an elegant solution.

    Dave

    Dave Elder, Tait Communications
    • Post Points: 20
  • Sun, Mar 22 2009 11:01 PM

    • Ejlersen
    • Top 10 Contributor
    • Joined on Mon, Jul 28 2008
    • Aalborg, Copenhagen
    • Posts 569
    • Points 9,965
    Re: RE: Running bat files using axlRunBatchDBProgram Reply

    Hi,

    Have you tried running it using the ?silent parameter?

    axlRunBatchDBProgram("cvs" "cvs watched >cvslog" ?silent t)

    Best regards,

    Ole

    Best regards Ole
    • Post Points: 20
  • Mon, Mar 23 2009 6:41 AM

    • Grungy Remnant
    • Not Ranked
    • Joined on Thu, Jul 17 2008
    • Ottawa, Ontario
    • Posts 8
    • Points 160
    Re: RE: Running bat files using axlRunBatchDBProgram Reply

     Hi Ole. Thanks for the response. 

     The problem is not making  axlRunBatchDBProgram silent but executing the redirect portion of the command.  axlRunBatchDBProgram simply ignores the >cvslog portion of the command so it cannot be used at all with this type of redirect command since it doesn't create the cvslog file.

     The command works with the system function but you cannot prevent the cmd.exe window from popping up briefly. Ideally I'd use axlRunBatchDBProgram with the ?silent parameter, if it worked.

    • Post Points: 20
  • Mon, Mar 23 2009 11:27 AM

    • natebizu
    • Not Ranked
    • Joined on Tue, Sep 16 2008
    • Chandler, AZ
    • Posts 5
    • Points 85
    Re: RE: Running bat files using axlRunBatchDBProgram Reply

    I don't want to give away all my tricks but, you can use "cmd /c" within the string.

    <pre>axlRunBatchDBProgram("cvs" "cmd /c cvs watched > cvslog" ?silent t)</pre> 

    I don't know what platform you are running in, but this only works for the Windows NT platform.

     

    • Post Points: 20
  • Tue, Mar 24 2009 12:10 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 736
    • Points 15,930
    Re: RE: Running bat files using axlRunBatchDBProgram Reply

    Thanks. That does it (Windows XP)

     Don't be shy with giving away all your tricks!

     Dave

    Dave Elder, Tait Communications
    • Post Points: 5
Page 1 of 1 (6 items)
Sort Posts:
Started by Grungy Remnant at 16 Mar 2009 09:44 AM. Topic has 5 replies.