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: problems with dxl-layout
Topic Summary:
Created On: 3-Apr-2007 17:55
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 Reik Schroeder, on Thursday, April 5, 2007 8:59 AM

Answer:
Hi Thomas,

you are looking for in links, so it makes no sense to try to open ModuleVersion sourceVer = targetVersion(l)

Ron is really right! You need to use the
for LinkRef in all (obj <- "*") do

to get the in links at all. To get the source version you need to use
sourceVersion(LinkRef)

If you are using a for Link in obj <- "*" do loop the open module code is not executed at all!
When the source module is not open, the body of loop will not be executed.

If it is enough to get the absolute number of in linked Object you may use the function
sourceAbsNo to get it without opening the source module.

I hope that helps you a little bit

Greetings
Reik
 3-Apr-2007 17:55
User is offline View Users Profile Print this message


Thomas Langholz

Posts: 40
Joined: 20-Oct-2005

hi all, i have a problem with my dxl-layout. my following dxl checks, if an object has any incoming links. if yes, it displays the identifier of the source-object. if not, it displays its own identifier. when both modules are open visible, everythings fine. if not, the dxl-layout always shows the current identifier no matter if object has in-links or not. whats wrong?? thanks for help thomas
Report this to a Moderator Report this to a Moderator
 3-Apr-2007 18:02
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

You need to have the source of the link open. Here is an example how to open the source module from the help file.

Object o = current
LinkRef lref
ModName_ srcModRef
for lref in o<-"*" do {
srcModRef = source lref
read(fullName(srcModRef), true)
}

Edited: 3-Apr-2007 at 18:02 by ron lewis
Report this to a Moderator Report this to a Moderator
 3-Apr-2007 18:13
User is offline View Users Profile Print this message


Thomas Langholz

Posts: 40
Joined: 20-Oct-2005

hi ron, thanks for help. i already ensure that the source-mod is opend - invisible! my problem is the different behaviour if the source-mod is opend visible or invisible. as followed the code-snippet

Edited: 3-Apr-2007 at 18:14 by Thomas Langholz
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 00:15
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I'm not up to speed yet on all this source version stuff. But Ron is right, you cannot see any inlinks unless the source module is already open. InLink loops should be routinely precedded with in LinkRef loops that open the source modules; allowing the subsequent in link loop to actually see links.

Don't you want to use 'sourceVersion(l)' instead of 'targetVersion(i)'? This is probably your problem.

The visible-invisible state of the module shouldn't matter.

- Louie
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 07:36
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Thomas,

you are looking for in links, so it makes no sense to try to open ModuleVersion sourceVer = targetVersion(l)

Ron is really right! You need to use the
for LinkRef in all (obj <- "*") do

to get the in links at all. To get the source version you need to use
sourceVersion(LinkRef)

If you are using a for Link in obj <- "*" do loop the open module code is not executed at all!
When the source module is not open, the body of loop will not be executed.

If it is enough to get the absolute number of in linked Object you may use the function
sourceAbsNo to get it without opening the source module.

I hope that helps you a little bit

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 07:36
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Removed double posting ;-) because of server failure
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany

Edited: 4-Apr-2007 at 07:37 by Reik Schroeder
Report this to a Moderator Report this to a Moderator
 4-Apr-2007 19:44
User is offline View Users Profile Print this message


Thomas Langholz

Posts: 40
Joined: 20-Oct-2005

alright thank you guys for your great help 8)
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.