![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: History in Skips and Returns Topic Summary: Created On: 10-Apr-2006 17:23 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
History in Skips and Returns
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.