Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Importing files
Topic Summary:
Created On: 16-Dec-2003 16:47
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 16-Dec-2003 16:47
User is offline View Users Profile Print this message


Srinivas Dasari

Posts: 24
Joined: 13-Dec-2003

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!!
Report this to a Moderator Report this to a Moderator
 16-Dec-2003 20:48
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 16-Dec-2003 23:37
User is offline View Users Profile Print this message


Srinivas Dasari

Posts: 24
Joined: 13-Dec-2003

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!
Report this to a Moderator Report this to a Moderator
 17-Dec-2003 14:55
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 29-Dec-2003 17:23
User is offline View Users Profile Print this message


Srinivas Dasari

Posts: 24
Joined: 13-Dec-2003

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.
Report this to a Moderator Report this to a Moderator
 5-Jan-2004 15:03
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 8-Jan-2004 22:36
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.