Contact an Expert

Discussion Forums are temporarily in read only mode. All forums are visible but posting is not possible. Please check back shortly.

Thread: How to get "Kind of Limits" using TestExecSL control


Permlink Replies: 2 - Pages: 1 - Last Post: Mar 10, 2010 5:16 AM Last Post By: Abe
Abe

Posts: 12
Registered: 11/12/08
How to get "Kind of Limits" using TestExecSL control
Posted: Mar 9, 2010 2:38 AM
Click to report abuse...   Click to reply to this thread Reply
Hi,

I am using C# 2008 and Agilent TestExecSL ActiveX control to customize a user interface application.

I have a problem getting “Kind of Limits” of the current test step.

This parameter is the selection of “Limits->Kind of Limits” when the action is a limit test (TestExecSL).

From the TestExecSL control, I can’t find anything about “Kind of Limits” or “Limit Type” or similar.

I have tried working with axTestExecSL1.Testplan.Tests.Item(testName) and axTestExecSL1.Testplan.Statements.Item(testName). But there is nothing I can find.

How could I get this then? If can’t, is there a work around solution?



Regards,
jinho

Posts: 42
Registered: 11/27/08
Re: How to get "Kind of Limits" using TestExecSL control
Posted: Mar 10, 2010 3:41 AM   in response to: Abe in response to: Abe
Click to report abuse...   Click to reply to this thread Reply
Hi there,

TestExec SL control has a Limit/Limits object, you can get more information from TestExec SL Control online help file.
Below are the VB.NET code snippet for setting up a Nominal Tolerance limit for EchoInt32 action, you can do the samething on the C# langauge also

...
Dim objAction As HPTestCoreRuntime.Action
Dim objLimit as HPTestCoreRuntime.Limit

' Insert the action 'EchoInt32'
objAction = objStatement.Actions.Add(1, "EchoInt32")
' Set the value of the 'Input' parameter to be a reference to 'IntegerOne' in table 'ExtSymTable'
objAction.Symbols.Item("Input").SetReference("IntegerOne", "ExtSymTable")
' Insert a Nominal limit checker for the output parameter 'Result'
objLimit = objAction.Limits.Add("Result", HPTestCoreRuntime.LimitType.LimitNominalTolerance)

' Set the limit checker values. These are hardcoded, limit parameter names.
objLimit.Symbols.Item("Nominal").Value = 123
objLimit.Symbols.Item("+/- Tolerance").Value = 2
Abe

Posts: 12
Registered: 11/12/08
Re: How to get "Kind of Limits" using TestExecSL control
Posted: Mar 10, 2010 5:16 AM   in response to: Abe in response to: Abe
Click to report abuse...   Click to reply to this thread Reply
Hi jinho,

Your answer is about how to set a new limit to a action.
Actually I wanted to get current executing action "Kind of Limits", which has been predefined already.
But your code gives me a good start. Thanks.

Point your RSS reader here for a feed of the latest messages in all forums