by
Trishia » Thu Oct 11, 2018 8:52 pm
For Chemstation (newer versions), you can find the value in the _SEQUENCE register. So for example:
numOfSamples = TabHdrVal(_SEQUENCE[1], "SeqTable1", "NumberOfRows")
As for MSD Chemstation (assuming an older version?), it's a little trickier since there doesn't seem to be a variable directly associated with the currently loaded sequence. One trick would be to directly access the SAMPLELOGTABLE data. In fact, there is a macro you can find and modified (called something like GetNumLines). Technically, you could do something like the following (pulled from mentioned macro; you can view the documentation or the macro itself for more details)
SAMPLELOGTABLE POSITION, "-1" !last line in seq. becomes pending line
SAMPLELOGTABLE ADVANCE !move by one
SAMPLELOGTABLE GETENTRY !get values for current entry
VARLOCK OFF
If (_runtype = -1) Then
_NUMLINES = _SEQLINE - 1
Else
_NUMLINES = _SEQLINE
EndIf
If (_SEQLINE = 349) Then !has to do with maxlines
SAMPLELOGTABLE ADVANCE
SAMPLELOGTABLE GETENTRY
If (_runtype <> -1) Then
_NUMLINES = _NUMLINES + 1
EndIf
EndIf
SAMPLELOGTABLE POSITION, "1"
VARLOCK ON
You may need to modify depending at what point you want to get this data (for example if it's resuming or something like that).