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: Display Folders in the Doors Database ?
Topic Summary:
Created On: 4-Nov-2003 15:35
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.
 4-Nov-2003 15:35
User is offline View Users Profile Print this message


sriakanth chalasani

Posts: 1
Joined: 22-Oct-2003

I have just started programming in DXL. This may be a very simple question to many of you. Does anybody know how to list folders in the Doors Database ?

Your help and time are appreciated !
thanks
Srikanth
Bloomington, USA.
Report this to a Moderator Report this to a Moderator
 4-Nov-2003 19:03
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Attached code should do it. Select a folder and it prints that folder and all folders and projects found under it. For the entire DB, select the "DOORS Database" root folder.

- Louie
Report this to a Moderator Report this to a Moderator
 4-Jan-2004 19:02
User is offline View Users Profile Print this message


Shawn Wilson

Posts: 5
Joined: 14-Nov-2002

Here is a modified version of the Louie's code that lists all Modules, Project, and Folders in a database. You wouldn't think that would be very hard but you do have to use recursion to get there (using the least amount of code).

---------------------------------------------

void List_Modules_Projects_Folders(string ptNameFoldFull, string ptType)
{
// Print the name of the current folder and all folders found under it
string tNameItem
string tType
Item iItem
Folder fFolder = folder(ptNameFoldFull)

if (null fFolder) {
print "Return - not a folder?\n"
return // not a folder?
}

if (ptType == "Folder") {
print ptNameFoldFull " (Folder)\n"
} else if (ptType == "Project") {
print ptNameFoldFull " (Project)\n"
} else {
print ptNameFoldFull " (Unknown)\n"
}


// for each item in the folder (but no sub-folders):
for iItem in fFolder do
{
tNameItem = fullName(iItem)
tType = type(iItem)
if (tType != "Folder" and tType != "Project") {
print tNameItem " (" tType ")\n"
continue // this is not a folder
}
//NameItem = fullName(itm)
List_Modules_Projects_Folders(tNameItem, tType) // *** Recursion
} // end for items in folder
} // end PrintFoldersInFolder()

List_Modules_Projects_Folders("/","?")
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.