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: How do I ....
Topic Summary: trying to write my first DXL
Created On: 11-May-2006 17:01
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.
 11-May-2006 17:01
User is offline View Users Profile Print this message


Ed Janonis

Posts: 10
Joined: 10-Aug-2005

I am trying to write my first DOORS DXL.  I started with something I thought would be simple.  Multiply two attribute in a module together and place it in another attribute.  So I started to see if I can loop thru all the objects in a module and try to read an attribute.  I figure if I can loop through a module and do that, everything else will be understood.

From I have been able to deduce from the DXL manual and library scripts this is what I have come up with:

pragma runLim, 0
void showOut(Object o)
  {
 Module current()
 Object myObj
 string s, s1
  for myObj in all current Module do
  {
     s = myObj."Conn ID"
     s1 = "Conn ID:  " s
     displayRich s1
  }
  }
showOut(obj)


I get an error running this of "Unable to resolve forward reference". 
What am I missing or where have I gone wrong?
Report this to a Moderator Report this to a Moderator
 11-May-2006 19:23
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

//Try
/**/

pragma runLim, 0
void showOut(Object o)
{
//Module current()
Object myObj
string s, s1
for myObj in all current Module do
{
s = myObj."Conn ID"
s1 = "Conn ID: " s
print s1 "\n"
}
}
showOut(obj)
Report this to a Moderator Report this to a Moderator
 12-May-2006 08:52
User is offline View Users Profile Print this message


Robert Swan

Posts: 86
Joined: 14-Apr-2005

current is a function that returns (in this case) the module name. But you're code tries to define it as a module name, causing failure. As Ron says remove the 'Module current ()' statement. Alternatively use 'Module mymod = current Module ' in its place and then 'for myObj in all mymod do ' as the loop.
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.