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: InLink Count Problem
Topic Summary:
Created On: 1-May-2008 21:40
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 Louie Landale, on Friday, May 2, 2008 9:02 AM

Answer:
[1] Your 'exists attribute' lines presume the current module. That may change as you open other modules; IIRC the 'current' module changes when a module is actually opened but doesn't change the 2nd time you open it (since its already open). I'd put "current = m" before these commands.

[1a] In fact, if the current module lacks both attributes 'Relevance' and 'Approved', it looks like you don't want to do anything. If so, move those checks before the main object look and if it fails end gracefully.

[2] If running from an open module, which you are, you don't need the original { and final } braces. I've NEVER ever done that and never had a problem; and I cannot help but suspect it could cause a problem.

Don't see anything else. Must be #1

- Louie
 1-May-2008 21:40
User is offline View Users Profile Print this message


Lisa Carver

Posts: 61
Joined: 15-Jun-2005

Hi there experts

I wonder if someone could help me please.

I attach the problem code. I am counting inlinks from certain Modules based on source identifier.
To do this I need to open the source module first, which I belive I am doing in the first loop which uses the LinkRef to open the sourcemodule, add to a skiplist (to close at the end). Unfortunately, the script does not produce correct results the first run through, if you run it twice then it will. This is really annoying me. Any help would be much appreciated. Thank you.
Report this to a Moderator Report this to a Moderator
 1-May-2008 22:29
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
[1] Your 'exists attribute' lines presume the current module. That may change as you open other modules; IIRC the 'current' module changes when a module is actually opened but doesn't change the 2nd time you open it (since its already open). I'd put "current = m" before these commands.

[1a] In fact, if the current module lacks both attributes 'Relevance' and 'Approved', it looks like you don't want to do anything. If so, move those checks before the main object look and if it fails end gracefully.

[2] If running from an open module, which you are, you don't need the original { and final } braces. I've NEVER ever done that and never had a problem; and I cannot help but suspect it could cause a problem.

Don't see anything else. Must be #1

- Louie
Report this to a Moderator Report this to a Moderator
 2-May-2008 09:01
User is offline View Users Profile Print this message


Lisa Carver

Posts: 61
Joined: 15-Jun-2005

Hi Louie

You got it !!! Thanks so much.

It was indeed the 'current = m' - or rather lack of it!!!


Thanks so much.
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.