![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Finding deleted modules Topic Summary: deleted modules Created On: 24-May-2007 18:26 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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 | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
Try on the view menu of project database: Show deleted items
|
|
![]() |
|
![]() |
|
i need to find these modules through out the database..
using DXL |
|
![]() |
|
![]() |
|
Item i
Project P =current for i in all P do if(isDeleted(i)) print name i " deleted\n" |
|
![]() |
|
![]() |
|
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
}
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
I didn't know that Tony. Thanks.
------------------------- David Pechacek AAI Services Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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.
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Finding deleted modules
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.