![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Importing files Topic Summary: Created On: 16-Dec-2003 16:47 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
We recently migrated to DOORS. All of our existing files in word have to be imported into doors in module form. I was wondering if there is any script that could look at all the word files in my windows directory and automatically create modules in doors for each of the word files!!
|
|
![]() |
|
![]() |
|
The attached code will find MS-Word files in a directory. I've never written DXL to import from word.
You really need to massage the MS-Word file BEFORE importing it into DOORS. Manipulating Word is a LOT easier than fixing the bugs once its in DOORS. Be sure the Word Document Map is clean (shows only Headings). Examine each paragraph mark (search for "^p") and make sure each represents a desired object. There is more you can do. - Louie |
|
![]() |
|
![]() |
|
Thank you Louie
I understand the intricacies of importing from word and definitely agree with your statements. Is there a way I can enter the file name of the word doc as the title of my module during the creation stage. the module creation syntax is: Module m = create ("module_name", "text","TL", 2003, true) where the module name is module_name. How do I make this name == file name of doc?? I think this command only takes strings and not references to strings! |
|
![]() |
|
![]() |
|
In my code above variable "NameFile" is the base name of the file. You could, I suppose, use that as the module name. I didn't verify this but I'm pretty sure you will end up importing into the "current" folder. So you may need code like:
string NameFoldDesired = "/My Project/My Folder/ImportFolder" Folder fldDesired = folder(NameFoldDesired) if (null fldDesired){ack("No such DOORS folder " NameFoldDesired); halt} current = fldDesired // Inside the loop: if (!isValidName(NameFile)) {ack("FileName is illegal Module Name " NameFile); continue} if (exists(module(NameFile)) {ack("Module already exists " NameFile "); continue} Are you really asking about direct/indirect addressing of function call parameters? The only thing I know about that is that after years of DXL coding I've NEVER run into a function that didn't take both a literal quote OR a variable for a "string" parameter. - Louie |
|
![]() |
|
![]() |
|
Thanks,
yes i am asking about the direct/indirect addresssing. So far, my code scans the *.docs and creates modules in doors but halts when it sees more than one doc cause it thinks it has to rewrite the already created mod, but it should create a new one with the new name. I am not sure how i can get a handle to the it so that it creates new ones for docs. |
|
![]() |
|
![]() |
|
If you send a variable with the name it will work. If it doesn't, then the problem isn't addressing its the way the importer works. Perhaps it presumes the "current module" as well as the current folder. If so, be sure to save and close your just-imported module before going on to the next one.
Otherwise, I don't understand the problem. - Louie |
|
![]() |
|
![]() |
|
Hi,
I tried to automate the import process about 2 years ago. The hard lesson learn't was that it ended up being quicker to do it manually than spend oodles of costly time trying to write DXL scripts to cater for every formatting quirk that authors can introduce into a MSWord document. Having manually exported loads of MSWord doc's into DOORS, I've never had one that hasn't required some sort of re-formating and preparation for export. No two doc's can be assumed to be the same, no two authors can be assumed to have the same level of understanding on how to use MSWord. I found that creating a handful of VBA macro's in MSWord to apply common formatting changes and prepare the document for export was far more effective. ------------------------- Paul Miller Specification Practices Specialist, EuroCyber, Melbourne, Australia. Mobile: +61 (0)418 135 103 Web Site: http://www.eurocyber.biz E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Importing files
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.