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: used Columns/Attributes by a given view
Topic Summary:
Created On: 25-Aug-2004 11:37
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 Paul Howstan, on Friday, August 27, 2004 9:10 AM

Answer:
I was messing around with Views a while back. Trying to copy the views from one module to another. As it turned out, it is not trivial to do, but I did stumble onto the following loop which will give you the name of each view in a module.

string s
Module m = read("A module path", true)
for s in views(m) do {
print "View: " s "\n"
View v = view(s)
load (m,v)
Column c
for c in m do{
print "\t"title(c) "\n"
}
}
close(m)

Unfortunately, if you do not load the module as visible, the views cannot be loaded and so, the columns are always returned as the default views columns.

Hope this helps

Paul
 25-Aug-2004 11:37
User is offline View Users Profile Print this message


Frank Held

Posts: 14
Joined: 16-Jul-2004

Hi,

how can i find out in dxl, which columns (or attributes) are displayed in a View?

-------------------------
Frank
Report this to a Moderator Report this to a Moderator
 25-Aug-2004 12:40
User is offline View Users Profile Print this message


Karen Hidalgo

Posts: 55
Joined: 4-Nov-2003

This will print the title of each column in the view:

Column c
int numOfCols = 0

for c in current do numOfCols++

string colName[numOfCols]
int x = 0

for c in current do {
colName[x] = (title c)
print colName [x] "\n"
x++
}



I use this because I have a user function that allows the user to multi-select columns to remove from their view.

I also have a user function that displays all the attributes available in the module so the user can multi-select to add attributes to their view.


-------------------------
Karen Hidalgo<BR>Northrop Grumman - TASC<BR>karen.hidalgo@ngc.com
Report this to a Moderator Report this to a Moderator
 25-Aug-2004 12:48
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

But that only works if the view is current (applied). I assumed Frank's question was concerning an arbitrary view that may not be currently diplayed. And I can't see a way of doing it directly.

Karen, does your method work if the module is open for reading but not displayed? Because that sounds like a work-around for Frank -- read the module undisplayed, apply the relevant view, note the columns, close the module. If the module was already open, you'll probably need to leave it open and reset the view to what it was before.

Paul.

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive
Report this to a Moderator Report this to a Moderator
 25-Aug-2004 13:41
User is offline View Users Profile Print this message


Paul Howstan

Posts: 4
Joined: 29-Jun-2004

Answer Answer
I was messing around with Views a while back. Trying to copy the views from one module to another. As it turned out, it is not trivial to do, but I did stumble onto the following loop which will give you the name of each view in a module.

string s
Module m = read("A module path", true)
for s in views(m) do {
print "View: " s "\n"
View v = view(s)
load (m,v)
Column c
for c in m do{
print "\t"title(c) "\n"
}
}
close(m)

Unfortunately, if you do not load the module as visible, the views cannot be loaded and so, the columns are always returned as the default views columns.

Hope this helps

Paul
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.