08-17-2011 05:25 AM
Hi all,
Am reading the propeties of step using C# as follows
SequenceContext
seqctx = e.uiMsg.Thread.GetSequenceContext(0, outframeid);
if(seqctx.PreviousStepIndex >= 0)
{
Stepprvstp = seqctx.PreviousStep;
StepTypeprvstptyp = prvstp.StepType;
PropertyObjectstepPropertObject = prvstptyp.AsPropertyObject();
string[] SteptobeinStatus=null;
if (string.Equals(prvstptyp.Name, "NumericLimitTest"))
{
StringstpName = prvstp.Name;
StringstpDesc = prvstp.Description;
double lwlimt = stepPropertObject.GetValNumber("Limits.Low", 0);
double measValue = stepPropertObject.GetValNumber("Result.Numeric", 0);
String unit = stepPropertObject.GetValString("Result.Units", 0);
double hglimt = stepPropertObject.GetValNumber("Limits.High", 0);
String resultstatus = prvstp.ResultStatus;
am able to get High and Low Limits and the Result of the step but am getting empty value when i access Numeric and Units property.
can some one please help me with get the velue
Thanks in advance
IVI
08-17-2011 12:10 PM
Are you perhaps access the properties before they are filled in? Are you sure the step executed?
-Doug
08-17-2011 10:29 PM
Hi,
Thanks for your quick response.
i found the solution.
i need to convert "Step: as an property object not the "StepType".
Thanks
IVI
08-18-2011 10:05 AM - edited 08-18-2011 10:05 AM
Ah yes, sorry I missed that. I should have looked at the code more carefully.
-Doug