RPE Lite export with DXL

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
StephenValliere - Fri Apr 01 07:25:05 EDT 2011

Re: RPE Lite export with DXL
SystemAdmin - Tue Apr 05 07:42:37 EDT 2011

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.

 

Re: RPE Lite export with DXL
Mathias Mamsch - Tue Apr 05 09:27:02 EDT 2011

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

Re: RPE Lite export with DXL
Mathias Mamsch - Tue Apr 05 09:27:47 EDT 2011

Mathias Mamsch - Tue Apr 05 09:27:02 EDT 2011
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.

Re: RPE Lite export with DXL
StephenValliere - Tue Apr 05 09:50:16 EDT 2011

SystemAdmin - Tue Apr 05 07:42:37 EDT 2011

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.

 

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

Re: RPE Lite export with DXL
StephenValliere - Tue Apr 05 09:51:17 EDT 2011

Mathias Mamsch - Tue Apr 05 09:27:47 EDT 2011
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.

Re: RPE Lite export with DXL
StephenValliere - Tue Apr 05 12:50:52 EDT 2011

Mathias Mamsch - Tue Apr 05 09:27:02 EDT 2011
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



 

 

Re: RPE Lite export with DXL
llandale - Tue Apr 05 13:12:30 EDT 2011

StephenValliere - Tue Apr 05 12:50:52 EDT 2011

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



 

 

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

Re: RPE Lite export with DXL
Mathias Mamsch - Wed Apr 06 02:52:18 EDT 2011

StephenValliere - Tue Apr 05 12:50:52 EDT 2011

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



 

 

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

 

Re: RPE Lite export with DXL
StephenValliere - Wed Apr 06 13:06:16 EDT 2011

Mathias Mamsch - Wed Apr 06 02:52:18 EDT 2011

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

 

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!

 

Re: RPE Lite export with DXL
Mathias Mamsch - Wed Apr 06 17:20:06 EDT 2011

StephenValliere - Wed Apr 06 13:06:16 EDT 2011

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!

 

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

 

 

Re: RPE Lite export with DXL
StephenValliere - Thu Apr 07 07:55:46 EDT 2011

Mathias Mamsch - Wed Apr 06 17:20:06 EDT 2011

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

 

 

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.

Re: RPE Lite export with DXL
Mathias Mamsch - Thu Apr 07 10:10:28 EDT 2011

StephenValliere - Thu Apr 07 07:55:46 EDT 2011
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

 

 

Re: RPE Lite export with DXL
StephenValliere - Thu Apr 07 10:29:04 EDT 2011

Mathias Mamsch - Thu Apr 07 10:10:28 EDT 2011

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

 

 

You're good! That works great.

Thanks for the help, I really appreciate it!

Re: RPE Lite export with DXL
StephenValliere - Wed May 04 07:53:02 EDT 2011

Mathias Mamsch - Thu Apr 07 10:10:28 EDT 2011

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

 

 

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



 

 

Re: RPE Lite export with DXL
Mathias Mamsch - Wed May 04 10:34:35 EDT 2011

StephenValliere - Wed May 04 07:53:02 EDT 2011

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



 

 

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

Re: RPE Lite export with DXL
StephenValliere - Wed May 04 10:45:06 EDT 2011

Mathias Mamsch - Wed May 04 10:34:35 EDT 2011
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

 

Re: RPE Lite export with DXL
StephenValliere - Wed May 04 10:51:06 EDT 2011

StephenValliere - Wed May 04 10:45:06 EDT 2011

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

 

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

Re: RPE Lite export with DXL
Mathias Mamsch - Wed May 04 15:52:35 EDT 2011

StephenValliere - Wed May 04 10:51:06 EDT 2011
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

 

Re: RPE Lite export with DXL
StephenValliere - Thu May 05 08:00:18 EDT 2011

Mathias Mamsch - Wed May 04 15:52:35 EDT 2011

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

 

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

Re: RPE Lite export with DXL
Yujhe.li - Tue Jun 05 02:22:53 EDT 2012

Mathias Mamsch - Thu Apr 07 10:10:28 EDT 2011

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

 

 

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.

Re: RPE Lite export with DXL
Mathias Mamsch - Tue Jun 05 07:57:25 EDT 2012

Yujhe.li - Tue Jun 05 02:22:53 EDT 2012
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

Re: RPE Lite export with DXL
Yujhe.li - Tue Jun 05 09:07:58 EDT 2012

Mathias Mamsch - Tue Jun 05 07:57:25 EDT 2012
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.

Re: RPE Lite export with DXL
mcrv - Tue Nov 05 08:37:52 EST 2013

Mathias Mamsch - Thu Apr 07 10:10:28 EDT 2011

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

 

 

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

cmd_RPE_lite.dxl

Re: RPE Lite export with DXL
Mathias Mamsch - Wed Nov 06 06:03:12 EST 2013

mcrv - Tue Nov 05 08:37:52 EST 2013

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

 

Re: RPE Lite export with DXL
mcrv - Wed Nov 06 08:26:01 EST 2013

Mathias Mamsch - Wed Nov 06 06:03:12 EST 2013

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

 

Ooops!.... a small correction for a great improve. It works!... Thanks a lot.

I'm also trying to run the script automatically at the DOORS start-up, using the command line switch -D "#include <....dxl>", where the pointed dxl open the module to export and execute the same operation of the cmd_RPE_lite. Unfortunally it does not run, and many warning are arisen at the include line:

#include <standard/export/RPE_Light/DoorsExport.inc>

Why?

Regards, Marco.

Re: RPE Lite export with DXL
Mathias Mamsch - Wed Nov 06 08:43:09 EST 2013

mcrv - Wed Nov 06 08:26:01 EST 2013

Ooops!.... a small correction for a great improve. It works!... Thanks a lot.

I'm also trying to run the script automatically at the DOORS start-up, using the command line switch -D "#include <....dxl>", where the pointed dxl open the module to export and execute the same operation of the cmd_RPE_lite. Unfortunally it does not run, and many warning are arisen at the include line:

#include <standard/export/RPE_Light/DoorsExport.inc>

Why?

Regards, Marco.

Can't say - You need to post some of the warnings. The most obvious reason is, that you need to have a current module, but you probably thought of that? Regards, Mathias

Re: RPE Lite export with DXL
BillTidy - Mon Nov 11 04:38:40 EST 2013

mcrv - Wed Nov 06 08:26:01 EST 2013

Ooops!.... a small correction for a great improve. It works!... Thanks a lot.

I'm also trying to run the script automatically at the DOORS start-up, using the command line switch -D "#include <....dxl>", where the pointed dxl open the module to export and execute the same operation of the cmd_RPE_lite. Unfortunally it does not run, and many warning are arisen at the include line:

#include <standard/export/RPE_Light/DoorsExport.inc>

Why?

Regards, Marco.

Please also note that the dialog has changed in DOORS 9.5, so you may need to update the script.

Re: RPE Lite export with DXL
mcrv - Mon Nov 11 10:39:59 EST 2013

Mathias Mamsch - Wed Nov 06 08:43:09 EST 2013

Can't say - You need to post some of the warnings. The most obvious reason is, that you need to have a current module, but you probably thought of that? Regards, Mathias

Mathias,

As your suggestion, I check my code in order to assure that the module is opened (I add to my DXL a 'flush ' instruction to avoid an unexpected stack underflow error...). Now, if I halt the DXL before the include statement of <DoorsExport.inc> and comment the rest of the code, no error is arisen :-), and I see my module opened, in read only.

On the contrary, the execution of the entire DXL is suspended for too many errors, the log is in the attachment. Many of these errors regard with entities already declared into DoorsExport.inc... but why only executing DOORS externally (-D switch)? They do no occur running from the DOORS main window.

Again, thanks in anvance.

Regards, Marco.


Attachments

log.log

Re: RPE Lite export with DXL
Mathias Mamsch - Mon Nov 11 11:08:24 EST 2013

mcrv - Mon Nov 11 10:39:59 EST 2013

Mathias,

As your suggestion, I check my code in order to assure that the module is opened (I add to my DXL a 'flush ' instruction to avoid an unexpected stack underflow error...). Now, if I halt the DXL before the include statement of <DoorsExport.inc> and comment the rest of the code, no error is arisen :-), and I see my module opened, in read only.

On the contrary, the execution of the entire DXL is suspended for too many errors, the log is in the attachment. Many of these errors regard with entities already declared into DoorsExport.inc... but why only executing DOORS externally (-D switch)? They do no occur running from the DOORS main window.

Again, thanks in anvance.

Regards, Marco.

From the log it seems, that you somehow include the necessary files for the export twice - that is why you are getting messages like:

-E- DXL: <standard/export/RPE_Light/DoorsExport.inc:37> (format) already declared in this scope

Please post the full commandline that you use to start DOORS and the content of the DXL script that is invoked (if it is not one of the build in ones).

Regards, Mathias

Re: RPE Lite export with DXL
dieli - Tue Nov 12 10:41:01 EST 2013

From the code above I have created a script which runs the RPE export on a given set of modules, but I could not find a way to change the Template the export uses. Can anyone give me a hint? I suppose its something like set(exportTemplate, myTemplateFile). I'm using DOORS 9.5.

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;
set(exportFileName, sFileName)
//set(exportTemplateName, sTemplateName)
//set(styleChoice, 0) // styleChoice gives an error
 
// show the dialog, timer will kick in and press our button
print "About to enter message loop ...\n";
oldshow tmpDB
 

Re: RPE Lite export with DXL
StephenValliere - Tue Nov 12 10:50:01 EST 2013

dieli - Tue Nov 12 10:41:01 EST 2013

From the code above I have created a script which runs the RPE export on a given set of modules, but I could not find a way to change the Template the export uses. Can anyone give me a hint? I suppose its something like set(exportTemplate, myTemplateFile). I'm using DOORS 9.5.

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;
set(exportFileName, sFileName)
//set(exportTemplateName, sTemplateName)
//set(styleChoice, 0) // styleChoice gives an error
 
// show the dialog, timer will kick in and press our button
print "About to enter message loop ...\n";
oldshow tmpDB
 

The command you are looking for is:

set(templateName,"test")

Re: RPE Lite export with DXL
dieli - Wed Nov 13 03:58:03 EST 2013

StephenValliere - Tue Nov 12 10:50:01 EST 2013

The command you are looking for is:

set(templateName,"test")

Hi Stephen,

I've tried the command you suggested, but I get the following error:

-E- DXL: <Line:106> incorrect arguments for function (set)
-I- DXL: All done. Errors reported: 1. Warnings reported: 0.
I have called the command like this (and variations of sTemplateName):
string sTemplateName = "C:\\Program Files\\Telelogic\\Doors9_5\\lib\\dxl\\standard\\export\\RPE_light\\source\\DOORS\\examples\\doorsView.dta"
set(templateName,sTemplateName)

Any ideas what is wrong?

EDIT: I found the correct command is "set(templateFile, sTemplateName)

Re: RPE Lite export with DXL
mcrv - Thu Nov 14 03:48:55 EST 2013

Mathias Mamsch - Mon Nov 11 11:08:24 EST 2013

From the log it seems, that you somehow include the necessary files for the export twice - that is why you are getting messages like:

-E- DXL: <standard/export/RPE_Light/DoorsExport.inc:37> (format) already declared in this scope

Please post the full commandline that you use to start DOORS and the content of the DXL script that is invoked (if it is not one of the build in ones).

Regards, Mathias

Hi Mathias,

I post in the attachments the called DXL and the batch DOS that invokes it. Within it the critical points have been marked as "// ****".

I'm sure that the scripts can be improved both: I apologize for that, but it's a starting point... I need something that works even if it's not in so good programming style!

Wow! It's great to see that someone else is interested on this approach to do more publishs on one shot! Maybe this batch DOS could be used... adding a loop on data retrieve from data.log... taking into account to solve this noisly errors on duplicated vars, of course!

Sure of your and community's good suggestions.

Many thanks to you/everybody, in advance.

Regards, Marco.


Attachments

(post)runRPElite.bat
(post)RPE_expView.dxl

Re: RPE Lite export with DXL
dieli - Thu Nov 14 11:31:09 EST 2013

mcrv - Thu Nov 14 03:48:55 EST 2013

Hi Mathias,

I post in the attachments the called DXL and the batch DOS that invokes it. Within it the critical points have been marked as "// ****".

I'm sure that the scripts can be improved both: I apologize for that, but it's a starting point... I need something that works even if it's not in so good programming style!

Wow! It's great to see that someone else is interested on this approach to do more publishs on one shot! Maybe this batch DOS could be used... adding a loop on data retrieve from data.log... taking into account to solve this noisly errors on duplicated vars, of course!

Sure of your and community's good suggestions.

Many thanks to you/everybody, in advance.

Regards, Marco.

I'm trying to do something similiar. I have a list of modules which i want to export as pdf with a predefined view. So far I have gotten is to iterate through the list (without export). As soon as i use the RPE my loop stops after one iteration. The export works fine though. I have attached my script. Maybe someone knows how to fix this.

 


Attachments

export_plan_pdf_v0.1.dxl

Re: RPE Lite export with DXL
Mathias Mamsch - Fri Nov 15 05:01:38 EST 2013

dieli - Thu Nov 14 11:31:09 EST 2013

I'm trying to do something similiar. I have a list of modules which i want to export as pdf with a predefined view. So far I have gotten is to iterate through the list (without export). As soon as i use the RPE my loop stops after one iteration. The export works fine though. I have attached my script. Maybe someone knows how to fix this.

 

Well I guess your problem is pretty obvious ... the oldshow tmpDB command will issue a "show()" halting your DXL script. You will have to use the eval_ version of the script to be able to iterate over multiple versions. Regards, Mathias

Re: RPE Lite export with DXL
frovira - Tue Mar 15 10:44:58 EDT 2016

Mathias Mamsch - Fri Nov 15 05:01:38 EST 2013

Well I guess your problem is pretty obvious ... the oldshow tmpDB command will issue a "show()" halting your DXL script. You will have to use the eval_ version of the script to be able to iterate over multiple versions. Regards, Mathias

Hi, 

 

I know that I'm reviving an old thread, but I test the code to export a module to PDF and I get an error saying that the exportFileName couldn't be set because it is not declared. I put the set after the showRPEExportDialog method...I done all that it is commented in this forum, but I don't understand why the code is falling.

 

Could anyone help me, please? I'm using IBM DOORS 9.5.

 

Thnks a lot in advance!!

        Ferran.

 

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
}

 

Re: RPE Lite export with DXL
AmjadMath - Wed Jan 03 08:13:41 EST 2018

Where can i download the file "DoorsExport.inc" that comes with DOORS 9.3 ? anyone could upload it here please ?