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: Treeview
Topic Summary: How to build up a treeview from a certain Project Folder ?
Created On: 24-Sep-2007 14:08
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.
 24-Sep-2007 14:08
User is offline View Users Profile Print this message


Utz Täuber

Posts: 10
Joined: 14-Aug-2007

Hi all,

i´m trying to build up a treeview from a certain Project Folder. The Treeview for the whole Database is working fine. But I want to build up the Treeview from a certain Project Folder. I don´t get it.

If i replace the "/" with a Project Folder name like "/myProject" in the the fillTreeSimple2 function it doesnt´t shows me anything but with "/" it works ?

THX



treeview.txt
treeview.txt  (1 KB)

Report this to a Moderator Report this to a Moderator
 24-Sep-2007 14:34
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

You need to insert the project name into the tree first. Then call fillTreeSimple2() with the project name as the second parameter.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 24-Sep-2007 15:09
User is offline View Users Profile Print this message


Utz Täuber

Posts: 10
Joined: 14-Aug-2007

Thank you for your fast answer. But how to get the rest (Modules,Folders,Projects) under this "nod" ?
Is there a simple function or must I iterate over all  Modules,Folders,Projects by Type and build the tree by Hand ? 
Report this to a Moderator Report this to a Moderator
 25-Sep-2007 12:01
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Add the following lines to your script

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 25-Sep-2007 12:37
User is offline View Users Profile Print this message


Utz Täuber

Posts: 10
Joined: 14-Aug-2007

Thank you for your reply. But it doesn´t work. :-( fillTreeSimple2(targetList, "/", "Project") --> That works It shows the whole database Tree fillTreeSimple2(targetList, strSourceProjectName, "Formal") ---> Thats doesn´t work. Nothing is displayed. strSourceProjectName really exists
Report this to a Moderator Report this to a Moderator
 25-Sep-2007 13:35
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

This code works for me.
I am using DOORS 8.1, but that should make no difference.
Try the code here, unedited.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 25-Sep-2007 14:08
User is offline View Users Profile Print this message


Utz Täuber

Posts: 10
Joined: 14-Aug-2007

Hi, I also use DOORS 8.1 But it won´t work. It shows me only the Project folder nothing more :-( .Strange. Do you get Project as "root" with all folder and Projects below this root Project?
Report this to a Moderator Report this to a Moderator
 25-Sep-2007 15:52
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

It works for me and displays the entire project hierarchy. See the screenshot attached.
Are you definitely running the code pasted from here and not changed in any way?

untitled.bmp
untitled.bmp  (601 KB)



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

Edited: 25-Sep-2007 at 15:53 by Tony Goodman
Report this to a Moderator Report this to a Moderator
 27-Sep-2007 15:23
User is offline View Users Profile Print this message


Utz Täuber

Posts: 10
Joined: 14-Aug-2007

I used the code from here and I don´t changed anything. Just copy and paste. It shows me only the Project Folder. I think the failure is somewhere in my dbtree.inc. But the function are called in the dbtree.inc. Perhaps i should get a new one.
Report this to a Moderator Report this to a Moderator
 27-Sep-2007 16:53
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Got it!
Well I think I have.

This code will only work if the project is in the database root folder.
I don't think it will work with nested projects.

That's because it relies on the fullName of the item to locate where to insert it in the tree.
The fullName goes back to the nearest ancester project, which is not necessarily the root.

You could try modifying the code in dbTree.inc to use rootName_() instead of fullName() and see what difference that makes. Make a backup copy first!

Not sure of the solution yet, but I will look into it.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 4-Oct-2007 11:27
User is offline View Users Profile Print this message


Chris Collingwood Hancock

Posts: 24
Joined: 8-Sep-2006

Hi Utz,

Did Tony Goodman's last suggestion, regarding the use of 'rootname_()' work for you in the end.
See the attached - we use 'rootname_(getparentfolder())' in our routines - allowing us to select a project which may or may not be nested within another project.
Regarding the populating of the treeview under a specific folder or project, in the attached example I am only displaying my "Equipment" items.
Anyway, this will hopefully show you how to obtain all other projects and/or folders under a selected project or folder (see 'if type(i) == folder or type(i) == project' condition in GetICDFiles procedure) . 

Regards,

Chris.


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.