![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Module to HTML automatic export. Topic Summary: HTML Export Created On: 17-May-2005 17:56 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
Does anybody know how to export Modules to HTML format automatically without GUI interaction using standard Telelogic DXL script ?
Any sample code would be highly appreciated. Thanks. |
|||
![]() |
|||
![]() |
|||
The attached is the Telelogic supplied HTML exporter with the GUI elements removed so it can be run in batch mode. You will need to hard code the parameters to the exportToHtml() function call.
script had bugs - see below for replacement. ------------------------- Tony Goodman http://www.smartdxl.com Edited: 19-May-2005 at 09:16 by Tony Goodman |
|||
![]() |
|||
![]() |
|||
I run into an error when I try to use the Export Module in a Loop. The first time through the loop it actually creates an HTML file, but the second time through the loop the error occurs. Can anyone tell me what the problem might be?
Below is the code snip. Output Error: 0 1 -R-E- DXL: Line:1303 null Skip parameter was passed into argument position 1 Backtrace: -I- DXL: execution halted //**************************************************************************** void findOpenModules() // DESCRIPTION : saves which modules are currently open // SIDE EFFECTS : adds the fullname of open modules to the global skpOpenMods { Module openModule f or openModule in database do { if (canRead openModule) { string moduleFullname = fullName openModule put(skpOpenMods, moduleFullname, moduleFullname) <--- Line 1303 } } } /****************************************************************************** MAIN ******************************************************************************/ string DoorsDbPath[] = { "/ProjectA/Doc1", "/ProjectA/Doc2", "/ProjectA/Doc3", "/ProjectA/Doc4", "/ProjectA/Doc5", "/ProjectA/Test/DocTest1", "/ProjectA/Software/DocSoft1", "/ProjectA/Software/DocSoft2", "/ProjectA/Software/DocSoft1" } int i = 0 openProject("ProjectA", "foobar", "foo") current = project "/ProjectA" for (i=0; i < 3 ; i++) { print i exportToHtml(DoorsDbPath, "c:/temp/doc" i ".html", 1, 0, true, false, true) } print "end" closeProject() /************************************************************************/ Edited: 18-May-2005 at 19:01 by Kyle Dixon |
|||
![]() |
|||
![]() |
|||
Looks like the script was never designed to call the main function more than once.
The skip lists are being deleted at the end of the do_export_file() function and not recreated again. Fix: the following lines already appear in function do_export_file() if (null nameList) { nameList = create } else { delete nameList nameList = create } Add the following lines after the above to create the other skip lists: if (null skpOpenMods) { skpOpenMods = create } else { delete skpOpenMods skpOpenMods = create } if (null skpLinkFiles) { skpLinkFiles = create } else { delete skpLinkFiles skpLinkFiles = create } if (null skpOpenMods) { skpOpenMods = create } else { delete skpOpenMods skpOpenMods = create } Also you need to set one of the skip list to null as follows: delete skpLinkFiles // this line already exists skpLinkFiles = null // you need to add this line It might be easier for you to add your changes again rather than make these, so I have attached the original with the above fixes for you.
------------------------- Tony Goodman http://www.smartdxl.com |
|||
![]() |
|||
![]() |
|||
Many thanks to all the users of this forum. It is a big help to us new DOORS admins.
I have used this above code and it works. I just changed the destination folder. I like the results. I would like to know if this script can be made to run during a nightly batch process. This process would need to login to doors, run script to export multiple modules in multiple projects, it would need to automatically overwrite the old html files then close DOORS. First things first, is this possible? ------------------------- Craig Forant me@craigforant.com |
|||
![]() |
|||
![]() |
|||
This is a great way to export to HTML as part of a batch process. I've used it on several modules and LOVE it!! The only improvement that might be made is if there were a way to hard-code a particular "View" to export.
Because the default module view is the only view that will export with this script, I sometimes have had to set the default view in some modules as the view I want to export. If there were some way to modify this script to include view information - that would be great. I tried to modify the following void exportToHtml(string mName, string vName, //added variable for "View" string fName, int useFmt, int expSrc, bool usePics, bool useChMeter, bool showLnks) //.............................................................. do_export_file(mName, vName, //using new variable here fName, useFmt, expSrc) //........................................................... exportToHtml("/WAS/ATCBI/ATCBI_VRTM","Export_To_HTML","J:/APPS/Doors/Data/Export_To_HTML/CO-ATCBI/Test.html",1,0,true,true,false) DOORS doesn't complain when I run the batch process, but it seems to ignore the view I'm trying to export and instead exports the module's default view. |
|||
![]() |
|||
![]() |
|||
Craig:
Make a batch file and here is the syntax. Start /b /WAIT doors.exe -d 36677@yourservername -batch "path to script\\yourscript.dxl" -u "ausername" -password "apassword" Have a batch user with read only permissions to the project/modules of interest. Chris: Create a batch user and set the default view for that user to be the one you want. Alternatively you can use the undocumented function to load a view in batch mode. quote: "Added a new variant of the view load perm: "bool load(Module, View, bool, bool)", where the added 4th parameter specifies whether to check that the module is displayed (as other variants always do), and to return false if the module is not displayed and the client is not running in batch mode. If the 4th parameter is set to true, then the behaviour is as for existing variants: the perm does not load the view, and it returns false. If the parameter is set to false, then this check is bypassed, so that a view can be loaded without the module being displayed, even when not running in batch mode. So use the form "load(Module, View, checkSave, false)" to load a view when the module isn't displayed. The checkSave parameter tells whether the code should prompt the user to save any unsaved changes to the current view first (if there are any). This parameter is already available, but it doesn't seem to be covered in the DXL manual..." So load(Module m, View v, false, false) will do it. But remember its unsupported and can change. This was introduced in 8.1 I believe. I don't know if it still works in 8.2 or 8.3. So I would suggest the first method. ------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com Edited: 8-May-2008 at 20:35 by David Pechacek |
|||
![]() |
Telelogic DOORS
» DXL Exchange
»
Module to HTML automatic export.
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.