Topic
  • 36 replies
  • Latest Post - ‏2016-03-15T14:44:58Z by frovira
StephenValliere
StephenValliere
30 Posts

Pinned topic RPE Lite export with DXL

‏2011-04-01T11:25:05Z |
Does anyone know of any DXL support for exporting through the RPE Lite (File -> Export -> Document Generation) buit in to DOORS 9.3?

I am trying to script an Export to a PDF so if anyone knows another way to do that I would also be interested.

Thanks,
Steve Valliere
Updated on 2012-06-05T13:07:58Z at 2012-06-05T13:07:58Z by Yujhe.li
  • SystemAdmin
    SystemAdmin
    3180 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T11:42:37Z  

    The PDF export dialog is built by the following script: DOORS\9.3\lib\dxl\standard\export\RPE_light\rpe_to_pdf.dxl which does not have much content:
     

    #include <standard/export/RPE_Light/DoorsExport.inc>
     
    showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), 
                (NLS_("pdf")), (NLS_(".pdf")))
    

     


    But, testing the above I was able to start the dialog from my own script. Did not find any other functions.

     

    Updated on 2014-01-02T18:32:23Z at 2014-01-02T18:32:23Z by iron-man
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T13:27:02Z  
    You can automate the export dialog, like described in other batch export dialogs. You can use the DBE variables like exportFileName, includeEmptyAttrsToggle, viewNameToggle or includeTablesToggle to define the options before launching exportCB(DBE) to simulate the button press. Maybe that helps, Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T13:27:47Z  
    You can automate the export dialog, like described in other batch export dialogs. You can use the DBE variables like exportFileName, includeEmptyAttrsToggle, viewNameToggle or includeTablesToggle to define the options before launching exportCB(DBE) to simulate the button press. Maybe that helps, Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
    I wanted to say: You can automate the export dialog, like described in other batch export posts in this forum.
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T13:50:16Z  

    The PDF export dialog is built by the following script: DOORS\9.3\lib\dxl\standard\export\RPE_light\rpe_to_pdf.dxl which does not have much content:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">#include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) </pre>

     


    But, testing the above I was able to start the dialog from my own script. Did not find any other functions.

     

    I got that far, but I need to be able to do this without the user being prompted for information.
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T13:51:17Z  
    I wanted to say: You can automate the export dialog, like described in other batch export posts in this forum.
    Thanks Methias,

    I will look into that. I have not tried to automate a dialog before.
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T16:50:52Z  
    You can automate the export dialog, like described in other batch export dialogs. You can use the DBE variables like exportFileName, includeEmptyAttrsToggle, viewNameToggle or includeTablesToggle to define the options before launching exportCB(DBE) to simulate the button press. Maybe that helps, Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

    I get an error when I execute the following code:
     

    // override some default message box functions, so they will only print the data but 
    // not pause execution. Write to a log file here! 
     
    bool confirm (string s) { print "Confirmed: " s "\n"; return true }
    void ack (string s) {print "Acknowledge: " s "\n" }
    void acknowledge (string s) {print "Acknowledge: " s "\n"  }
    void infobox (string s) {print "Info: " s "\n" }
    void info (string s) {print "Info: " s "\n" }
     
    DB tmpDB = null
     
    // Now override block and show, to only do realize
    void show  (DB x) { realize x; tmpDB = x }
    void block (DB x) { realize x; tmpDB = x }
     
    {
        #include <standard/export/RPE_Light/DoorsExport.inc>
     
            set(exportFileName,"C:\\Documents and Settings\\user\\Desktop\\Test.pdf")
            set(includeEmptyAttrsToggle, true)
            set(viewNameToggle, true)
            set(includeTablesToggle, true)
            
            exportCB(DBE)
            
            if(!null tmpDB) destroy tmpDB
            
            //showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))
    }
    

     


    The error I get is:

     

     

     

    -R-E- DXL: <Line:20> unassigned variable (exportFileName)
    



    Any ideas? Did I set this up wrong?

    Thanks,
    Steve



     

     

    Updated on 2014-01-02T18:33:37Z at 2014-01-02T18:33:37Z by iron-man
  • llandale
    llandale
    3035 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-05T17:12:30Z  

    I get an error when I execute the following code:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">// override some default message box functions, so they will only print the data but // not pause execution. Write to a log file here! bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Acknowledge: " s "\n" } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "Info: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null // Now override block and show, to only do realize void show (DB x) { realize x; tmpDB = x } void block (DB x) { realize x; tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> set(exportFileName,"C:\\Documents and Settings\\user\\Desktop\\Test.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) exportCB(DBE) if(!null tmpDB) destroy tmpDB //showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) } </pre>

     


    The error I get is:

     

     

     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">-R-E- DXL: <Line:20> unassigned variable (exportFileName) </pre>



    Any ideas? Did I set this up wrong?

    Thanks,
    Steve



     

     

    exportFileName hasn't yet been defined. I don't have that include file DoorsExport.inc, but probably the code that defines that DBE in a dialog is not automatically called, you must do that. And it probably also issues the "show" command which means you won't be able create the dialog, change its elements, and display it that way.

    • Louie
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-06T06:52:18Z  

    I get an error when I execute the following code:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">// override some default message box functions, so they will only print the data but // not pause execution. Write to a log file here! bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Acknowledge: " s "\n" } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "Info: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null // Now override block and show, to only do realize void show (DB x) { realize x; tmpDB = x } void block (DB x) { realize x; tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> set(exportFileName,"C:\\Documents and Settings\\user\\Desktop\\Test.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) exportCB(DBE) if(!null tmpDB) destroy tmpDB //showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) } </pre>

     


    The error I get is:

     

     

     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">-R-E- DXL: <Line:20> unassigned variable (exportFileName) </pre>



    Any ideas? Did I set this up wrong?

    Thanks,
    Steve



     

     

    You still need to call the
     

    showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), 
                (NLS_("pdf")), (NLS_(".pdf")))
    

     


    function, before you start modifying the dialog ... Otherwise it will not exist and you get the "unassigned variable" error ... :-) Otherwise the code should be fine...

    Regards, Mathias

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    Updated on 2014-01-02T18:34:14Z at 2014-01-02T18:34:14Z by iron-man
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-06T17:06:16Z  

    You still need to call the
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) </pre>

     


    function, before you start modifying the dialog ... Otherwise it will not exist and you get the "unassigned variable" error ... :-) Otherwise the code should be fine...

    Regards, Mathias

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    So I added that line back in and this is what I have now:
     

    // override some default message box functions, so they will only print the data but 
    // not pause execution. Write to a log file here! 
     
    bool confirm (string s) { print "Confirmed: " s "\n"; return true }
    void ack (string s) {print "Ack: " s "\n" }
    void errorBox (string s) {print "Error: " s "\n"; }
    void warningBox (string s) {print "Warning: " s "\n"; }
    void acknowledge (string s) {print "Acknowledge: " s "\n"  }
    void infobox (string s) {print "InfoBox: " s "\n" }
    void info (string s) {print "Info: " s "\n" }
     
    DB tmpDB = null
     
    // Now override block and show, to only do realize
     
    void show  (DB x) { realize x; tmpDB = x }
     
     
    {
        #include <standard/export/RPE_Light/DoorsExport.inc>
            
            showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))
     
            set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf")
            set(includeEmptyAttrsToggle, true)
            set(viewNameToggle, true)
            set(includeTablesToggle, true)
            set(styleChoice,0)
            
            exportCB(DBE)
    }
    

     


    I Don't get the error anymore, now I get a bar showing the export progress (which is fine I am not trying to run totally silent) but when the bar gets to the end it says "Timed out whilst trying to create C:\Users\THEUSER\Desktop\Test4.pdf" (THEUSER is actually the username not THEUSER).
    Also I was able to play around with some code and get it to export while giving me the error that says "unassigned variable", but everything I do to get rid of the error either gives me a different error or produces the same result as the code above...

    Any ideas? I am running out of hair to pull out.

    -Steve

    THANKS FOR ALL THE HELP! I wouldn't have gotten this close without it!

     

    Updated on 2014-01-02T18:35:03Z at 2014-01-02T18:35:03Z by iron-man
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-06T21:20:06Z  

    So I added that line back in and this is what I have now:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">// override some default message box functions, so they will only print the data but // not pause execution. Write to a log file here! bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null // Now override block and show, to only do realize void show (DB x) { realize x; tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) exportCB(DBE) } </pre>

     


    I Don't get the error anymore, now I get a bar showing the export progress (which is fine I am not trying to run totally silent) but when the bar gets to the end it says "Timed out whilst trying to create C:\Users\THEUSER\Desktop\Test4.pdf" (THEUSER is actually the username not THEUSER).
    Also I was able to play around with some code and get it to export while giving me the error that says "unassigned variable", but everything I do to get rid of the error either gives me a different error or produces the same result as the code above...

    Any ideas? I am running out of hair to pull out.

    -Steve

    THANKS FOR ALL THE HELP! I wouldn't have gotten this close without it!

     

    Hey Steve,

    don't worry about the "Timed Out" message for starters. The export script will wait for 75 seconds if that file that you specified got exported. If it cannot find that file it will tell you the time our error. This does not mean, that your export has not been started. The RPE light plugin will just start java over the commandline, so you want to check, if you have a 'java.exe' running, after you start your script. What you should do in any case is to verify that you can do the export over the normal GUI (and will not timeout after 75 seconds) and then you can add

    ...
      // add this before the show ...
      void oldshow(DB x) { show x }
      void show  (DB x) { realize x; tmpDB = x }
      ...
    

     


    and call "oldshow tmpDB" instead of doexport. This should popup the export GUI with your new settings applied. Then you can verify the settings, and press the export button manually and see if it will bring a different result. Maybe this helps, regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    Updated on 2014-01-02T18:35:38Z at 2014-01-02T18:35:38Z by iron-man
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-07T11:55:46Z  

    Hey Steve,

    don't worry about the "Timed Out" message for starters. The export script will wait for 75 seconds if that file that you specified got exported. If it cannot find that file it will tell you the time our error. This does not mean, that your export has not been started. The RPE light plugin will just start java over the commandline, so you want to check, if you have a 'java.exe' running, after you start your script. What you should do in any case is to verify that you can do the export over the normal GUI (and will not timeout after 75 seconds) and then you can add

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">... // add this before the show ... void oldshow(DB x) { show x } void show (DB x) { realize x; tmpDB = x } ... </pre>

     


    and call "oldshow tmpDB" instead of doexport. This should popup the export GUI with your new settings applied. Then you can verify the settings, and press the export button manually and see if it will bring a different result. Maybe this helps, regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    Ok, that functioned as you expected... Adding in that line and calling it instead of the exportCB allowed me to generate the PDF with the settings I chose. And I monitored the processes and in both cases javaw.exe runs while the file is trying to export. However in the automated one javaw.exe stops and the export times out, no file being created. It seems like there is something else being called or set that I am missing when i override show.
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-07T14:10:28Z  
    Ok, that functioned as you expected... Adding in that line and calling it instead of the exportCB allowed me to generate the PDF with the settings I chose. And I monitored the processes and in both cases javaw.exe runs while the file is trying to export. However in the automated one javaw.exe stops and the export times out, no file being created. It seems like there is something else being called or set that I am missing when i override show.

    Ok, I think I know what the problem is (unfortunately I cannot try for myself, so we need to keep up the trial and error). But don't worry, we will get this running.

    My guess is that the java program will reconnect to DOORS using the COM interface. Since this is not possible while another DXL program runs (i.e. our export script that was never actually shown or blocked) the script will fail controlling DOORS and therefore quit without doing the export.

    So we need to take another approach. Since we need to be into show or block, we must simulate the buttonpress after a call to block / show. We will do this using a timer:
     

    bool confirm (string s) { print "Confirmed: " s "\n"; return true }
    void ack (string s) {print "Ack: " s "\n" }
    void errorBox (string s) {print "Error: " s "\n"; }
    void warningBox (string s) {print "Warning: " s "\n"; }
    void acknowledge (string s) {print "Acknowledge: " s "\n"  }
    void infobox (string s) {print "InfoBox: " s "\n" }
    void info (string s) {print "Info: " s "\n" }
     
    DB tmpDB = null
    DBE tm = null
     
    // Notice that show will only store the variable now. 
    void oldshow  (DB x) { show x} 
    void show  (DB x) { tmpDB = x }
     
    {
        #include <standard/export/RPE_Light/DoorsExport.inc>
     
            // create the dialog but do not show it yet
            showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))
            
            // add a timer to it, it will 'press' the button now after we do show ...
            void newcb(DBE x) {
                print "Calling timercallback ...\n"           
                stopTimer tm; exportCB(null)
            }
     
            tm = timer(tmpDB, 0.2, newcb, ""); 
            // realize the dialog box, so we can apply the settings ....
            realize tmpDB; 
            // apply the settings
            set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf")
            set(includeEmptyAttrsToggle, true)
            set(viewNameToggle, true)
            set(includeTablesToggle, true)
            set(styleChoice,0)
     
            // show the dialog, timer will kick in and press our button
            print "About to enter message loop ...\n"
            oldshow tmpDB
    }
    

     


    Lets see if we got luck with this one ;-) Regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    Updated on 2014-01-02T18:36:30Z at 2014-01-02T18:36:30Z by iron-man
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-04-07T14:29:04Z  

    Ok, I think I know what the problem is (unfortunately I cannot try for myself, so we need to keep up the trial and error). But don't worry, we will get this running.

    My guess is that the java program will reconnect to DOORS using the COM interface. Since this is not possible while another DXL program runs (i.e. our export script that was never actually shown or blocked) the script will fail controlling DOORS and therefore quit without doing the export.

    So we need to take another approach. Since we need to be into show or block, we must simulate the buttonpress after a call to block / show. We will do this using a timer:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null DBE tm = null // Notice that show will only store the variable now. void oldshow (DB x) { show x} void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> // create the dialog but do not show it yet showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) // add a timer to it, it will 'press' the button now after we do show ... void newcb(DBE x) { print "Calling timercallback ...\n" stopTimer tm; exportCB(null) } tm = timer(tmpDB, 0.2, newcb, ""); // realize the dialog box, so we can apply the settings .... realize tmpDB; // apply the settings set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) // show the dialog, timer will kick in and press our button print "About to enter message loop ...\n" oldshow tmpDB } </pre>

     


    Lets see if we got luck with this one ;-) Regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    You're good! That works great.

    Thanks for the help, I really appreciate it!
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-04T11:53:02Z  

    Ok, I think I know what the problem is (unfortunately I cannot try for myself, so we need to keep up the trial and error). But don't worry, we will get this running.

    My guess is that the java program will reconnect to DOORS using the COM interface. Since this is not possible while another DXL program runs (i.e. our export script that was never actually shown or blocked) the script will fail controlling DOORS and therefore quit without doing the export.

    So we need to take another approach. Since we need to be into show or block, we must simulate the buttonpress after a call to block / show. We will do this using a timer:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null DBE tm = null // Notice that show will only store the variable now. void oldshow (DB x) { show x} void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> // create the dialog but do not show it yet showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) // add a timer to it, it will 'press' the button now after we do show ... void newcb(DBE x) { print "Calling timercallback ...\n" stopTimer tm; exportCB(null) } tm = timer(tmpDB, 0.2, newcb, ""); // realize the dialog box, so we can apply the settings .... realize tmpDB; // apply the settings set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) // show the dialog, timer will kick in and press our button print "About to enter message loop ...\n" oldshow tmpDB } </pre>

     


    Lets see if we got luck with this one ;-) Regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    Hey Mathias,

    I have run into another problem with this script.

    I need to run it from within another script and so I set up a function to call eval_ as shown below:
     

    void preDocumentCheckIn(DBE x)
    {
        documentExistsTimer = timer(optionsDB, 0.2, checkForPDF, "")
            eval_("
                    Module thisM = current
            
                    bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true }
                    void ack (string s) {print \"Ack: \" s \"\\n\" }
                    void errorBox (string s) {print \"Error: \" s \"\\n\"; }
                    void warningBox (string s) {print \"Warning: \" s \"\\n\"; }
                    void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\"  }
                    void infobox (string s) {print \"InfoBox: \" s \"\\n\" }
                    void info (string s) {print \"Info: \" s \"\\n\" }
                    
                    DB tmpDB = null
                    DBE tm1 = null
                    
                    string pdfPath = \"C:\\\\\" name(thisM) \".pdf\"
                    string err = \"\"
                    
                    // Now override block and show, to only do realize
                    void oldshow(DB x) { show x }
                    void show  (DB x) { tmpDB = x }
                    {
                            
                            #include <standard/export/RPE_Light/DoorsExport.inc>
                            
                            showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\")))
                            
                            void hitButtonCB(DBE x) {
                            stopTimer tm1
                            exportCB(null)
                        }
                        
                        tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); 
                        realize tmpDB; 
                            
                            set(exportFileName,pdfPath)
                            set(includeEmptyAttrsToggle, true)
                            set(viewNameToggle, true)
                            set(includeTablesToggle, true)
                            set(styleChoice,0)
                            
                            oldshow tmpDB
                    }
                    
            ")
    }
    

     


    However, when I call this function it seems to be executing but the progress bar eventually gets to the end and I get an error saying that it timed out while trying to create the PDF.

    But the same code:

     

     

     

    Module thisM = current
     
    bool confirm (string s) { print "Confirmed: " s "\n"; return true }
    void ack (string s) {print "Ack: " s "\n" }
    void errorBox (string s) {print "Error: " s "\n"; }
    void warningBox (string s) {print "Warning: " s "\n"; }
    void acknowledge (string s) {print "Acknowledge: " s "\n"  }
    void infobox (string s) {print "InfoBox: " s "\n" }
    void info (string s) {print "Info: " s "\n" }
     
    DB tmpDB = centered("Export to PDF")
    DBE tm1 = null
     
    string pdfPath = "C:\\" name(thisM) ".pdf"
    string err = ""
     
    // Now override block and show, to only do realize
    void oldshow(DB x) { show x }
    void show  (DB x) { tmpDB = x }
     
    {
        #include <standard/export/RPE_Light/DoorsExport.inc>
            
            showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf")))
            
            void hitButtonCB(DBE x) {
            stopTimer tm1
            exportCB(null)
        }
        
        tm1 = timer(tmpDB, 0.5, hitButtonCB, ""); 
        
        realize tmpDB; 
            
            set(exportFileName,pdfPath)
            set(includeEmptyAttrsToggle, true)
            set(viewNameToggle, true)
            set(includeTablesToggle, true)
            set(styleChoice,0)
     
        oldshow tmpDB
     
    }
    



    Works when not in the eval_ function.

    Any ideas?

    -Thanks
    Steve



     

     

    Updated on 2014-01-02T18:38:09Z at 2014-01-02T18:38:09Z by iron-man
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-04T14:34:35Z  

    Hey Mathias,

    I have run into another problem with this script.

    I need to run it from within another script and so I set up a function to call eval_ as shown below:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">void preDocumentCheckIn(DBE x) { documentExistsTimer = timer(optionsDB, 0.2, checkForPDF, "") eval_(" Module thisM = current bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true } void ack (string s) {print \"Ack: \" s \"\\n\" } void errorBox (string s) {print \"Error: \" s \"\\n\"; } void warningBox (string s) {print \"Warning: \" s \"\\n\"; } void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\" } void infobox (string s) {print \"InfoBox: \" s \"\\n\" } void info (string s) {print \"Info: \" s \"\\n\" } DB tmpDB = null DBE tm1 = null string pdfPath = \"C:\\\\\" name(thisM) \".pdf\" string err = \"\" // Now override block and show, to only do realize void oldshow(DB x) { show x } void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\"))) void hitButtonCB(DBE x) { stopTimer tm1 exportCB(null) } tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); realize tmpDB; set(exportFileName,pdfPath) set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) oldshow tmpDB } ") } </pre>

     


    However, when I call this function it seems to be executing but the progress bar eventually gets to the end and I get an error saying that it timed out while trying to create the PDF.

    But the same code:

     

     

     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">Module thisM = current bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = centered("Export to PDF") DBE tm1 = null string pdfPath = "C:\\" name(thisM) ".pdf" string err = "" // Now override block and show, to only do realize void oldshow(DB x) { show x } void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) void hitButtonCB(DBE x) { stopTimer tm1 exportCB(null) } tm1 = timer(tmpDB, 0.5, hitButtonCB, ""); realize tmpDB; set(exportFileName,pdfPath) set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) oldshow tmpDB } </pre>



    Works when not in the eval_ function.

    Any ideas?

    -Thanks
    Steve



     

     

    Probably for the same reason the last approach did time out ... When you call showRPEExportDialog() you must be in the callback of a shown dialog, since RPE will try to call back over COM to DOORS. Unfortunately you did not post, how you call your "preDocumentCheckIn" function. This seems to already be a DBE callback, so you might be able to considerably simplify the code, but still this should work. What is definitvely wrong is, that the 'current' module is not set in the eval context, so this could be the secret. Try redefining the current module in the eval_ context correctly, by passing the module name as a string into the eval code, get a handle to the module, and set the current Module to it.

    Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-04T14:45:06Z  
    Probably for the same reason the last approach did time out ... When you call showRPEExportDialog() you must be in the callback of a shown dialog, since RPE will try to call back over COM to DOORS. Unfortunately you did not post, how you call your "preDocumentCheckIn" function. This seems to already be a DBE callback, so you might be able to considerably simplify the code, but still this should work. What is definitvely wrong is, that the 'current' module is not set in the eval context, so this could be the secret. Try redefining the current module in the eval_ context correctly, by passing the module name as a string into the eval code, get a handle to the module, and set the current Module to it.

    Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

    I get the same result with this:
     

    void preDocumentCheckIn(DBE x)
    {
        documentExistsTimer = timer(optionsDB, 0.2, checkForPDF, "")
            eval_("
                    Module thisM = edit(\"" fullName(m) "\",true)
                    
                    current = thisM
            
                    bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true }
                    void ack (string s) {print \"Ack: \" s \"\\n\" }
                    void errorBox (string s) {print \"Error: \" s \"\\n\"; }
                    void warningBox (string s) {print \"Warning: \" s \"\\n\"; }
                    void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\"  }
                    void infobox (string s) {print \"InfoBox: \" s \"\\n\" }
                    void info (string s) {print \"Info: \" s \"\\n\" }
                    
                    DB tmpDB = null
                    DBE tm1 = null
                    
                    string pdfPath = \"C:\\\\\" name(thisM) \".pdf\"
                    string err = \"\"
                    
                    // Now override block and show, to only do realize
                    void oldshow(DB x) { show x }
                    void show  (DB x) { tmpDB = x }
                    {
                            
                            #include <standard/export/RPE_Light/DoorsExport.inc>
                            
                            showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\")))
                            
                            void hitButtonCB(DBE x) {
                            stopTimer tm1
                            exportCB(null)
                        }
                        
                        tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); 
                        realize tmpDB; 
                            
                            set(exportFileName,pdfPath)
                            set(includeEmptyAttrsToggle, true)
                            set(viewNameToggle, true)
                            set(includeTablesToggle, true)
                            set(styleChoice,0)
                            
                            oldshow tmpDB
                    }
                    
            ")
    }
    

     


    It does seem like an environment or context problem like you said, I am just not sure what else I need to define or pass in to get it to work.

    -Steve

     

    Updated on 2014-01-02T18:39:01Z at 2014-01-02T18:39:01Z by iron-man
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-04T14:51:06Z  

    I get the same result with this:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">void preDocumentCheckIn(DBE x) { documentExistsTimer = timer(optionsDB, 0.2, checkForPDF, "") eval_(" Module thisM = edit(\"" fullName(m) "\",true) current = thisM bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true } void ack (string s) {print \"Ack: \" s \"\\n\" } void errorBox (string s) {print \"Error: \" s \"\\n\"; } void warningBox (string s) {print \"Warning: \" s \"\\n\"; } void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\" } void infobox (string s) {print \"InfoBox: \" s \"\\n\" } void info (string s) {print \"Info: \" s \"\\n\" } DB tmpDB = null DBE tm1 = null string pdfPath = \"C:\\\\\" name(thisM) \".pdf\" string err = \"\" // Now override block and show, to only do realize void oldshow(DB x) { show x } void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\"))) void hitButtonCB(DBE x) { stopTimer tm1 exportCB(null) } tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); realize tmpDB; set(exportFileName,pdfPath) set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) oldshow tmpDB } ") } </pre>

     


    It does seem like an environment or context problem like you said, I am just not sure what else I need to define or pass in to get it to work.

    -Steve

     

    Since RPE Lite is a java-based function it seems to me that it is failing to initialize the java code, and since DOORS gets no response from the java, it gives the time-out error. I have no idea what would need to be initialized to get the java function to work inside of the eval_ function.

    When I run my script on its own out side of the eval_ function the progress bar only gets about 1/8th of the way across and it creates the PDF.

    -Steve
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-04T19:52:35Z  
    Since RPE Lite is a java-based function it seems to me that it is failing to initialize the java code, and since DOORS gets no response from the java, it gives the time-out error. I have no idea what would need to be initialized to get the java function to work inside of the eval_ function.

    When I run my script on its own out side of the eval_ function the progress bar only gets about 1/8th of the way across and it creates the PDF.

    -Steve

    It has nothing to do with the eval_ context ... As I said you need to post how you call the 'preDocumentCheckIn' function. Chances are you are locking DOORS up with a DXL script while the RPE is trying to connect back to DOORS over COM.

    Regards, Mathias

    The following code using eval_ works for me from a current module (yeah I have access to DOORS 9.3 now):

    print fullName current Module
     
    void cb (DBE x) {
     
        eval_("
                    Module thisM = edit(\"" fullName(current Module) "\",true)
                    
                    current = thisM
            
                    bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true }
                    void ack (string s) {print \"Ack: \" s \"\\n\" }
                    void errorBox (string s) {print \"Error: \" s \"\\n\"; }
                    void warningBox (string s) {print \"Warning: \" s \"\\n\"; }
                    void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\"  }
                    void infobox (string s) {print \"InfoBox: \" s \"\\n\" }
                    void info (string s) {print \"Info: \" s \"\\n\" }
                    
                    DB tmpDB = null
                    DBE tm1 = null
                    
                    string pdfPath = \"C:\\\\\" name(thisM) \".pdf\"
                    string err = \"\"
                    
                    // Now override block and show, to only do realize
                    void oldshow(DB x) { show x }
                    void show  (DB x) { tmpDB = x }
                    {
                            
                            #include <standard/export/RPE_Light/DoorsExport.inc>
                            
                            showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\")))
                            
                            void hitButtonCB(DBE x) {
                            stopTimer tm1
                            exportCB(null)
                        }
                        
                        tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); 
                        realize tmpDB; 
                            
                            set(exportFileName,pdfPath)
                            set(includeEmptyAttrsToggle, true)
                            set(viewNameToggle, true)
                            set(includeTablesToggle, true)
                            set(styleChoice,0)
                            
                            oldshow tmpDB
                    }
                    
            ")
    }
     
    DB diag = create("Export Test") 
    button (diag, "Do Export Of Current", cb)
     
    show diag
    

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    Updated on 2014-01-02T18:39:54Z at 2014-01-02T18:39:54Z by iron-man
  • StephenValliere
    StephenValliere
    30 Posts

    Re: RPE Lite export with DXL

    ‏2011-05-05T12:00:18Z  

    It has nothing to do with the eval_ context ... As I said you need to post how you call the 'preDocumentCheckIn' function. Chances are you are locking DOORS up with a DXL script while the RPE is trying to connect back to DOORS over COM.

    Regards, Mathias

    The following code using eval_ works for me from a current module (yeah I have access to DOORS 9.3 now):

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">print fullName current Module void cb (DBE x) { eval_(" Module thisM = edit(\"" fullName(current Module) "\",true) current = thisM bool confirm (string s) { print \"Confirmed: \" s \"\\n\"; return true } void ack (string s) {print \"Ack: \" s \"\\n\" } void errorBox (string s) {print \"Error: \" s \"\\n\"; } void warningBox (string s) {print \"Warning: \" s \"\\n\"; } void acknowledge (string s) {print \"Acknowledge: \" s \"\\n\" } void infobox (string s) {print \"InfoBox: \" s \"\\n\" } void info (string s) {print \"Info: \" s \"\\n\" } DB tmpDB = null DBE tm1 = null string pdfPath = \"C:\\\\\" name(thisM) \".pdf\" string err = \"\" // Now override block and show, to only do realize void oldshow(DB x) { show x } void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> showRPEExportDialog(LS_(\"String_Export_To_PDF\", NLSTEMP_(\"Export to PDF\")), (NLS_(\"pdf\")), (NLS_(\".pdf\"))) void hitButtonCB(DBE x) { stopTimer tm1 exportCB(null) } tm1 = timer(tmpDB, 0.2, hitButtonCB, \"Hit Button\"); realize tmpDB; set(exportFileName,pdfPath) set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) oldshow tmpDB } ") } DB diag = create("Export Test") button (diag, "Do Export Of Current", cb) show diag </pre>

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

    Thanks Mathias, you saved the day again... I was using block on my DB, when i switched it to show it worked.

    I owe you one!

    -Steve
  • Yujhe.li
    Yujhe.li
    5 Posts

    Re: RPE Lite export with DXL

    ‏2012-06-05T06:22:53Z  

    Ok, I think I know what the problem is (unfortunately I cannot try for myself, so we need to keep up the trial and error). But don't worry, we will get this running.

    My guess is that the java program will reconnect to DOORS using the COM interface. Since this is not possible while another DXL program runs (i.e. our export script that was never actually shown or blocked) the script will fail controlling DOORS and therefore quit without doing the export.

    So we need to take another approach. Since we need to be into show or block, we must simulate the buttonpress after a call to block / show. We will do this using a timer:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null DBE tm = null // Notice that show will only store the variable now. void oldshow (DB x) { show x} void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> // create the dialog but do not show it yet showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) // add a timer to it, it will 'press' the button now after we do show ... void newcb(DBE x) { print "Calling timercallback ...\n" stopTimer tm; exportCB(null) } tm = timer(tmpDB, 0.2, newcb, ""); // realize the dialog box, so we can apply the settings .... realize tmpDB; // apply the settings set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) // show the dialog, timer will kick in and press our button print "About to enter message loop ...\n" oldshow tmpDB } </pre>

     


    Lets see if we got luck with this one ;-) Regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    Hi, Mathis

    Where can I get these attribute about the following setting ?

    set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf")
    set(includeEmptyAttrsToggle, true)
    set(viewNameToggle, true)
    set(includeTablesToggle, true)
    set(styleChoice,0)

    Thanks.
  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2012-06-05T11:57:25Z  
    • Yujhe.li
    • ‏2012-06-05T06:22:53Z
    Hi, Mathis

    Where can I get these attribute about the following setting ?

    set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf")
    set(includeEmptyAttrsToggle, true)
    set(viewNameToggle, true)
    set(includeTablesToggle, true)
    set(styleChoice,0)

    Thanks.
    Sorry, what is the question? Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
  • Yujhe.li
    Yujhe.li
    5 Posts

    Re: RPE Lite export with DXL

    ‏2012-06-05T13:07:58Z  
    Sorry, what is the question? Regards, Mathias

    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
    I mean how do you know these attributes, like "exportFileName", "includeEmptyAttrsToggle", "viewNameToggle",...etc. Because I can't find them in the DOORS manual.

    Thanks.
  • mcrv
    mcrv
    4 Posts

    Re: RPE Lite export with DXL

    ‏2013-11-05T13:37:52Z  

    Ok, I think I know what the problem is (unfortunately I cannot try for myself, so we need to keep up the trial and error). But don't worry, we will get this running.

    My guess is that the java program will reconnect to DOORS using the COM interface. Since this is not possible while another DXL program runs (i.e. our export script that was never actually shown or blocked) the script will fail controlling DOORS and therefore quit without doing the export.

    So we need to take another approach. Since we need to be into show or block, we must simulate the buttonpress after a call to block / show. We will do this using a timer:
     

    <pre class="javascript dw" data-editor-lang="js" data-pbcklang="javascript" dir="ltr">bool confirm (string s) { print "Confirmed: " s "\n"; return true } void ack (string s) {print "Ack: " s "\n" } void errorBox (string s) {print "Error: " s "\n"; } void warningBox (string s) {print "Warning: " s "\n"; } void acknowledge (string s) {print "Acknowledge: " s "\n" } void infobox (string s) {print "InfoBox: " s "\n" } void info (string s) {print "Info: " s "\n" } DB tmpDB = null DBE tm = null // Notice that show will only store the variable now. void oldshow (DB x) { show x} void show (DB x) { tmpDB = x } { #include <standard/export/RPE_Light/DoorsExport.inc> // create the dialog but do not show it yet showRPEExportDialog(LS_("String_Export_To_PDF", NLSTEMP_("Export to PDF")), (NLS_("pdf")), (NLS_(".pdf"))) // add a timer to it, it will 'press' the button now after we do show ... void newcb(DBE x) { print "Calling timercallback ...\n" stopTimer tm; exportCB(null) } tm = timer(tmpDB, 0.2, newcb, ""); // realize the dialog box, so we can apply the settings .... realize tmpDB; // apply the settings set(exportFileName,"C:\\Users\\THEUSER\\Desktop\\Test4.pdf") set(includeEmptyAttrsToggle, true) set(viewNameToggle, true) set(includeTablesToggle, true) set(styleChoice,0) // show the dialog, timer will kick in and press our button print "About to enter message loop ...\n" oldshow tmpDB } </pre>

     


    Lets see if we got luck with this one ;-) Regards, Mathias

     

     

     


    Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

     

     

    I'm trying export to Word through RPE Lite on DOORS 9.4, using the DXL retrieved from this forum.

    The script in the attachment launchs the export and shows the progress bar. At the bar completion it arises the "Exporting large modules can take some time. Do you want to continue?" dialog box: if I choose "yes/yes to all" a new progress bar is shown, and so on; the "no" choice terminates the process without makes the DOC file. I noted that the javaw.exe has been run.

    I also tried with the original version on DOORS 9.3, getting the same behaviour.

    Maybe something occurs on RPE Lite since the posts within this forum. Has anyone any idea about the reason of export fail?

    Thanks in advance.
    Regard, Marco.

    Attachments

  • Mathias Mamsch
    Mathias Mamsch
    2147 Posts

    Re: RPE Lite export with DXL

    ‏2013-11-06T11:03:12Z  
    • mcrv
    • ‏2013-11-05T13:37:52Z

    I'm trying export to Word through RPE Lite on DOORS 9.4, using the DXL retrieved from this forum.

    The script in the attachment launchs the export and shows the progress bar. At the bar completion it arises the "Exporting large modules can take some time. Do you want to continue?" dialog box: if I choose "yes/yes to all" a new progress bar is shown, and so on; the "no" choice terminates the process without makes the DOC file. I noted that the javaw.exe has been run.

    I also tried with the original version on DOORS 9.3, getting the same behaviour.

    Maybe something occurs on RPE Lite since the posts within this forum. Has anyone any idea about the reason of export fail?

    Thanks in advance.
    Regard, Marco.

    Hi Marco,

    wow it took me a while to find the problem ;-) At some point I noticed the original code was still working, while your code did not work. I was stumped until I compared the call from rpe_to_word.dxl (in the standard/export/RPE_light/rpe_to_word.dxl) with your code. Their code reads:

     

    ...
    showRPEExportDialog(LS_("String_Export_To_Word", NLSTEMP_("Export to Word")(NLS_("Word")), (NLS_(".doc")))
    ...

    Your code reads:

    ...
    showRPEExportDialog(LS_("String_Export_To_Word", NLSTEMP_("Export to Word")), (NLS_("doc")), (NLS_(".doc")))
    ...

    Now find the difference, and you should be able to correct your problem. The problem is, that IBM did a very bad job of error handling - the RPE export just waits for the export file to appear, so if anything goes wrong the Export Dialog will wait forever.

    Regards, Mathias