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: determine module vs folder vs project
Topic Summary: Need to determine if current item is a formal module
Created On: 15-Jun-2006 14:10
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.
 15-Jun-2006 14:10
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Report this to a Moderator Report this to a Moderator
 15-Jun-2006 14:14
User is offline View Users Profile Print this message


Al Lione

Posts: 59
Joined: 13-Jul-2004

Not sure why my previous post was blank, but basically here is my problem: I use "for item in current Project do" to get the name of every item within the heirarchy of the current project. It lists everything, including modules, folders, projects ,etc... I need to know if the current item is a formal module. How can I make this determination with dxl? Thanks!
Report this to a Moderator Report this to a Moderator
 15-Jun-2006 14:33
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Al,
you may use :
string type(Item)

Greetings
Reik Schröder

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


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 15-Jun-2006 15:36
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Here is an example, Al.

Note that the test for Project is done before the test for Folder because a Project IS also a Folder.
Other types not in the example are "Link" and "Descriptive".

You should also protect your code from null and deleted items by including the following at the beginning of the loop:
if (null itm || isDeleted(itm)) continue

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 15-Jun-2006 16:15
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Tony,

how can a Project be a Folder, when you are using the string type (Item) function?
It will return a string which can be either Project or Folder?!

BTW: The differences between Folder and Project are:
1) Projects have to use an unique name within one DB
2) you can access items within a project with project relative pathes, but on folders you can't do so



Greetings
Reik Schröder

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


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 15-Jun-2006 23:50
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

The "type" of a project is "Project" and not "Folder". But a project will return non-null values for both the following:
Folder fld = folder(NameProject)
Project prj = project(NameProject)

3) Projects can be archived. Of course you can archive a folder by changing it to a project, archiving it, then changing it back to a folder.
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.