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: Capturing the list of Views in a Module
Topic Summary:
Created On: 14-Jan-2009 12:02
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.
 14-Jan-2009 12:02
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

As the subject of this post goes, I am looking for a method to print the list of views in a module. I am aware of a mechanism for printing the list of attributes in a module - but not one for views. Any input on this would be highly appreciated. Thank you in advance.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 14-Jan-2009 12:30
User is offline View Users Profile Print this message


Karl Breuer

Posts: 66
Joined: 11-Jul-2005

Pranav,

sometimes it might be helpful to just look into the DXL help:

"for view in module
Syntax
for s in views(Module m) do {
...
}
where:

s is a string variable
m is a module of type Module


Operation
Assigns the string s to be each successive view name in the module m.

Example
This example prints all views in the current module:

string name
for name in views current Module do
print name "\n"


--
rgds
Karl
Report this to a Moderator Report this to a Moderator
 14-Jan-2009 14:34
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Karl,
Thank you for your prompt response to my post. I looked up the dxl reference manual but was unable to find this bit. Anyway, I will try your approach and let you know how it works out. Thank you once again.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
 14-Jan-2009 18:47
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

That gives you the view names. In order to get the columns of a view, you regrettably need to convert the name of the view to a View, load the view, then query the current columns; IIRC like this:
View viu = view(NameView)
load(viu)
Column col
for col in current Module do { ...}

- Louie

Edited: 15-Jan-2009 at 15:54 by Louie Landale
Report this to a Moderator Report this to a Moderator
 14-Jan-2009 19:06
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

Hi Louie,
For now, I am only looking to capture the view names in a list. Thank you for your input.

Regards,

Pranav
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.