Uniface User Forum

 View Only
  • 1.  Export frm on command line

    Posted 12-30-2022 07:18
    Hi All

    I would like to do a uniface repository export of a frm from inside a different uniface repository

    I am surprised I can't seem to export a form using the command line switches... so an /imp but for export.

    I thought of using /tst but /tst does not allow input parametes picked up by $1, $2 etc
    I did not won't to create a text file and then import that.

    I assume I am missing something very obvious.

    Can someone point me in the right direction

    Thanks
    Oz



    ------------------------------
    Osman Shariff
    ------------------------------


  • 2.  RE: Export frm on command line

    ROCKETEER
    Posted 12-30-2022 08:30
    Hi Osman,

    You could use the undocumented ude.exe, which is a command line interface for the $ude ProcScript function.

    With the operation help you can see the command line syntax of the ude.exe:

    > ude.exe help

    Output:

    Uniface 10 Development Environment
     
    > ude {/GeneralSwitch(es)} Operation Type Source {+ Source} {Destination} {-Option(s)}

    Here is how to export (e.g.) a component:

    > ude.exe /asn=test.asn export component myform myform.xml

    Options are specified (e.g.) like this: -append. Please note that for options that accept the values true or false you do not specify the value. If the option should be false then you omit it and when it should be true then you add it (e.g. -append).

    I hope this helps.



    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 3.  RE: Export frm on command line

    Posted 12-30-2022 09:43
    Hi Daniel

    That works perfectly...

    Thanks for the quick response

    ------------------------------
    Osman Shariff
    ------------------------------



  • 4.  RE: Export frm on command line

    Posted 01-03-2023 10:11
    Hi again Daniel

    In reference to -append, I tried something that did not work as I expected.

    I created a .bat with 2 lines of code (like below)... I hoped that it would create just one output file, but it did not. It created an output file for each line and waited till I exited each one before continuing to the next.

    Is there a way to achieve just one output file or none even, for a batch of ude commands

    Thanks

    start.bat
    ude.exe /asn=test.asn export component myform myform.xml -append
    ude.exe /asn=test.asn export component myform myform.xml -append

    ------------------------------
    Osman Shariff
    ------------------------------



  • 5.  RE: Export frm on command line

    ROCKETEER
    Posted 01-03-2023 10:47
    Hi Osman,

    I just did a quick test here and it seems to work fine. I did my test using the current Uniface 10.4 patch 10.4.02-012. When I execute the above batch then I get just one export/output file called myform.xml that includes the component myform twice - that is if myform.xml did not exist to begin with. If I execute the batch again then I still only get myform.xml, but this time 4x.

    And you should use the ASN-setting $TRANSCRIPT_LOG_FILE in case you want that ude.exe quits automatically (without the need to close the transcript window).

    And under which circumstance would you expect no output file? Even if the specified component does not exist then Uniface will create an "empty" export file. The Export form of the IDE basically works in the same way.

    I hope this helps.


    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 6.  RE: Export frm on command line

    Posted 01-03-2023 11:48
    Thanks Daniel, it was  $TRANSCRIPT_LOG_FILE that I needed.

    ------------------------------
    Osman Shariff
    ------------------------------