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: Finding deleted modules
Topic Summary: deleted modules
Created On: 24-May-2007 18:26
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.
Answer This question was answered by Reik Schroeder, on Tuesday, June 26, 2007 3:49 PM

Answer:
Hi Tony,

you may right, that you can handle projects like folders in
for Item in (Project|Folder) do
loop.
But if (type(item) == "Folder") cannot be true for both folders and projects because it will do a string comparision.

So the default recursion will be like attached script ...

Greetings
Reik
 24-May-2007 18:26
User is offline View Users Profile Print this message


Tarun Inabathuni

Posts: 59
Joined: 18-Jan-2005

Hi

I am trying to find the list of soft deleted modules in a project..

i tried using item loop but it does not include deleted items

So, is there a way to do this..

Regards
Tarun
Report this to a Moderator Report this to a Moderator
 24-May-2007 18:35
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Try on the view menu of project database: Show deleted items
Report this to a Moderator Report this to a Moderator
 24-May-2007 20:05
User is offline View Users Profile Print this message


Tarun Inabathuni

Posts: 59
Joined: 18-Jan-2005

i need to find these modules through out the database..
using DXL
Report this to a Moderator Report this to a Moderator
 24-May-2007 21:03
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Item i
Project P =current
for i in all P do if(isDeleted(i)) print name i " deleted\n"
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 15:38
User is offline View Users Profile Print this message


Dave Jennings

Posts: 1
Joined: 22-Sep-2004

I've also been looking at this using DOORS 8.2. I think there may be two problems with the last proposal and this version of DOORS. 1) "all" is not permitted in this context 2) looking through a project does not show deleted items. (Please see manual "for all items in project") However, the solution appears to be to write a loop that looks through "all" items in a folder (surrounded if necessary by looking through all releavnt folders). The following works: bool linkModuleIsDeleted(string theModuleName) { Item folderItemsRef Item itemRef Folder theFolder for folderItemsRef in current Project do { if ("Folder" == type(folderItemsRef)) { theFolder = folder (folderItemsRef) for itemRef in all theFolder do { if ("Link" == type(itemRef)) { if(name(itemRef) == theModuleName) { if (isDeleted(itemRef)) return true return false } } } } } return false }
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 16:09
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

As Louie mentioned elsewhere, Project loops are pretty redundant these days. I always loop through folders.

Note that in a for item in folder loop the following test returns true for both folders and projects:
if (type(item) == "Folder")

EDIT: Gibberish - What I meant to say was:

if (folder fullName itm) returns true for Projects as well as Folders.

-------------------------
Tony Goodman
http://www.smartdxl.com

Edited: 20-Jun-2007 at 14:06 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 16:11
User is offline View Users Profile Print this message


David Pechacek

Posts: 674
Joined: 5-Dec-2006

I didn't know that Tony. Thanks.

-------------------------
David Pechacek
AAI Services Textron
dpechacek@sc-aaicorp.com
David.Pechacek@gmail.com
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 17:29
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Tony,

you may right, that you can handle projects like folders in
for Item in (Project|Folder) do
loop.
But if (type(item) == "Folder") cannot be true for both folders and projects because it will do a string comparision.

So the default recursion will be like attached script ...

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 19-Jun-2007 20:27
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Both projects and folder return 'true' for the bool folder(NameFull) command. No, the 'type(itm)' command returns a string, either 'Folder' or 'Project' but not, of course, both.
Report this to a Moderator Report this to a Moderator
 20-Jun-2007 14:02
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I stand corrected.
Thanks for pointing out my nonsense ramblings and noticing that what I thought I was saying was different from what I was actually saying.
put(mouth, 0, foot)

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.