![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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 | |
![]() |
|
Hi,
how can i find out in dxl, which columns (or attributes) are displayed in a View? ------------------------- Frank |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
used Columns/Attributes by a given view
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.