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: History in Skips and Returns
Topic Summary:
Created On: 10-Apr-2006 17:23
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.
 10-Apr-2006 17:23
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

I've got quite a few library functions that deal with History. So far all take a History variable as a parameter and deals with it, usually finding certain kinds of History or dumping the facts of the History. All the History variables are set via the "for hst in obj/mod" do loops.

I'm expanding now figuring to write routines that find certain History and returning it (History FindLastHist(Object obj)), either as a function return or as one of the function call parameters (void FindLastHist(Object obj, History &hst)). This seems to be failing. I'm also storing History in a Skip list and that's generating odd DXL run time errors.

I guess that "History" variable is not like an "Integer" variable (i = j means set the value of i to the value of j); perhaps its like a "Buffer" variable (bufA = bufB means make bufA an alias for bufB, does NOT copy the contents over).

Anyway, I was wonding if anyone has had much luck dealing with History variables that get assigned values.

- Louie
Report this to a Moderator Report this to a Moderator
 9-Mar-2007 19:55
User is offline View Users Profile Print this message


Jason Zawodny

Posts: 1
Joined: 7-Mar-2007

Following the advice from topics on this forum regarding baselines and skips, I figured the same applied to history and skips. So off I went updating my script to put the history records in skips before doing anything with them.

After 3 hours of debug chasing all sorts of strange history types that didn't apply to an object (such as synchronizeModule, createLink, and just plain run-time errors from invalid history types) I concluded that History and Skips don't get along at all. I'm not at all sure why, but that's my conclusion.

At least not in DOORS 7.1
Report this to a Moderator Report this to a Moderator
 12-Mar-2007 09:35
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

I have some scripts that do history processing and I use a DxlObject to hold the information from each history record. These are then stored in skip lists. This method means that I am only ever reading from a history record, never writing to one. Whether this is the problem or not, I don't know.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Mar-2007 13:23
User is offline View Users Profile Print this message


Michael Sutherland

Posts: 248
Joined: 13-Sep-2002

Louie,

I've had consistent problems using the History data type when the History data is obtained within a "for h in ... do" loop, and then attempting to use the History data type outside the loop.

My solution has been to get the data I need from the History record inside the loop, and storing the data for use outside the loop, and not attempting to access the History record outside the loop.

-------------------------
Michael Sutherland
michael@galactic-solutions.com
http://galactic-solutions.com
Report this to a Moderator Report this to a Moderator
 13-Mar-2007 23:37
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Consider this:
for hst in obj do
{ if I care about this history then hstSave = hst
}
Well, variable hstSave is not the value of the history I care about, its the value of that last History in the loop; since hstSave = hst just makes an alias of hstSave it doesn't retain the history.

Consider instead this:
Count = 0
for hst in obj do
{ Count++
if I care about this history then CountFound = Count
}
// Now find the History I care about
Count = 0
for hst in obj do
{ Count++
if (Count == CountFound) break
}
// NOW hst has the History I care about.

- Louie
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.