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: Looping through views in a module
Topic Summary: How do I loop through views
Created On: 21-Jul-2006 11: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.
 21-Jul-2006 11:08
User is offline View Users Profile Print this message


Alan Gooch

Posts: 107
Joined: 30-Aug-2005

I'm trying to produce a list of all views in all formal modules, within each view I should identify all displayed columns and the attribute (if applicable) that they refer to.

The attached code sort of works, in that it lists the columns and associated attributes, but although it loops through the views, it always extracts the information for the CURRENT view.

How can I change the current view (I can't find any function to do this in the DXL Help), so that the loop works properly.

TIA
Report this to a Moderator Report this to a Moderator
 21-Jul-2006 11:44
User is offline View Users Profile Print this message


Neal Middlemore

Posts: 35
Joined: 24-Mar-2005

Alan,

I haven't tried it but this should work....

I added these two lines

View v = view(sViewName) //sets the view name to load
load(m, v) // loads the view

in the for sViewName in module loop

Report this to a Moderator Report this to a Moderator
 21-Jul-2006 12:06
User is offline View Users Profile Print this message


Alan Gooch

Posts: 107
Joined: 30-Aug-2005

Neal,

I see the plan.

I changed the script and re-ran it, but still only the 'current' view is output.
Report this to a Moderator Report this to a Moderator
 21-Jul-2006 12:37
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

To do anything with views, you must open the module visible.

You cannot load views when the module is not visible.

The load command does not give an error, but it does not load the view.

The "view" that is loaded when a module is opened not visible is the default view.

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


Neal Middlemore

Posts: 35
Joined: 24-Mar-2005

Yup, apologies for not pointing that out, I didn't check to see if you had them visible or not....

Report this to a Moderator Report this to a Moderator
 21-Jul-2006 13:47
User is offline View Users Profile Print this message


Alan Gooch

Posts: 107
Joined: 30-Aug-2005

Great that works, thanks.

Now, any way of speeding it up :-)
Report this to a Moderator Report this to a Moderator
 24-Jul-2006 08:58
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

Outputting to a file runs quicker than printing. add to the start of file:- string TempFile = "C:\\Temp\\DOORSData.txt" Stream out = write TempFile then replace the print lines with :- out << Linetext "\n" where Linetext is the text you want. The drawback is you can't see what's happening, until after the run. Speed problems due to time to open files I can't help with.
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.