Hello, |
Re: How to identify the DOORS current session number? You want to compare a specific history session with the current history session - is that correct? If yes - what exactly are you wanting to compare as the session number is just a number? Are you wanting to compare the attribute data of objects as they were for a specific session with the attribute data of objects in the current session so that you can see the difference between two sessions? Or, are you wanting to compare history record data between a specific session and the current session? Paul Miller Melbourne, Australia |
Re: How to identify the DOORS current session number?
I should have at least provided you with some code inmy previous post to help you determine what the current session number is, use the code below which is based on an example provided in the DXL Reference Manual.
HistorySession hs
int sessionNum = 0
for hs in current Module do {
sessionNum = number(hs) + 1
print sessionNum ", " when(hs) ", " who(hs) "\n"
}
print "The current session number is: " sessionNum""
Paul Miller |
Re: How to identify the DOORS current session number? |
Re: How to identify the DOORS current session number? SystemAdmin - Mon May 23 19:35:40 EDT 2011
I should have at least provided you with some code inmy previous post to help you determine what the current session number is, use the code below which is based on an example provided in the DXL Reference Manual.
HistorySession hs
int sessionNum = 0
for hs in current Module do {
sessionNum = number(hs) + 1
print sessionNum ", " when(hs) ", " who(hs) "\n"
}
print "The current session number is: " sessionNum""
Paul Miller
Found that +1 oddity some time ago as well. I don't know the cause but I would guess the conflict is in the GUI, where it reads the session number but displays +1 for all to see; I presume the stored number is zero but it gets displayed as 1.
HistorySession GetCurrentSession(Module mod)
{ // Get the current Session if the module is opened Edit or Share
if (null mod or isRead(mod)) //
then return(HistorySession null)
else return(HistorySession current(mod))
} // end GetCurrentSession()
|