04-05-2013 04:17 AM
when klicking tools-> Import/Export Properties... for Import the file StationGlobals.txt(see att.) im getting several error messages:
Error evaluating expression:RunState.InitialSelection.SelectedFile.Data.Seq["MainSequence"].Locals.Limits = (8000)
Property does not exist.
...
any ideas?
thank for replying
04-05-2013 12:45 PM
my guess is that the property doesn't exist..... 🙂
I don't see the attachment.
Actually, RunState properties can be dynamic so you wouldn't see them during edit time. If it's running and you import it with the property loader does it work? Personally I don't think it's a good idea to have RunState properties in your limit file like that. You should store it as a Local variable and then read it in and assign it to the RunState property.
Regards,
04-09-2013 03:23 AM
thank you for replying..
property loader comes up with following message:
Sequence File: pploader.seq
Property Loader step failed to import or export properties.
791 property value(s) were found.
0 property value(s) were imported from 183 row(s) of data
it seems as the properties are not automatically created by the property loader...
we have defined many limits and threshold spread over many files. but a lot off the limits contain the same value. with locals i would have to manage all locals in different files? thats why i choosed the stationglobals as some kind of database for all files. how would you solve this kind of problem?
04-09-2013 08:32 AM
Now you've just confused me even more....
Here's what I understand:
You want to use stationglobals as a repository for limits? You want to use the Property Loader step to import and populate stationglobals?
Is that correct?
From your original post it looked as though your limit file contained a RunState property. Hence the Runstate error. The error you saw was because the RunState property didn't exist when you manually tried to import the limit file. However, during execution it probably works?
Is that correct?
Regards,
04-09-2013 08:33 AM
BTW- you are correct that importing properties does not create them. It just populates existing ones with different values.
04-10-2013 01:56 AM
sorry for confusing you 😉
You want to use stationglobals as a repository for limits? You want to use the Property Loader step to import and populate stationglobals?
exactly.
BTW- you are correct that importing properties does not create them. It just populates existing ones with different values.
-i think that's the problem.
-is there a way that the stationglobals are automatically created by Teststand?
04-10-2013 08:06 AM
You would have to have a step to create the station globals.
Basically you precondition a statement step with:
!PropertyExists("StationGlobals.Foo")
Then for the expression you would use the NewSupProperty method:
StationGlobals.NewSubProperty("Foo", PropValType_String, False, "", 0x1) Or something like that depending on your type.
This is from the TS Help:
NewSubProperty Method
Syntax
PropertyObject.NewSubProperty ( lookupString, ValueType, asArray, typeNameParam, options)
Purpose
Creates a new subproperty with the name the lookupString parameter specifies.
Remarks
Note TestStand does not validate property names you create programmatically for invalid characters, such as spaces, which can result in errors when you use expressions. Use the PropertyObject.ValidateNewSubPropertyName method to validate property names. TestStand expressions require PropertyObject names to be strings that contain only letters, numbers, and underscores. PropertyObject names cannot contain spaces, start with a number, or be empty. Additionally, the PropertyObject name cannot be "Value", and you cannot have duplicate subproperty names. For example, MyVariableName_2000 is a valid PropertyObject name. Names of elements in a PropertyObject array can contain any character. Both sequence names and step names are examples of such named array elements. However, sequence names cannot be empty or contain control characters. You cannot have duplicate sequence names. The name NI is reserved at the root level for attributes.
Parameters
lookupString As String
[In] Pass the lookup string for the new subproperty to create. If you pass a lookup string with multiple levels (such as "x.y.z"), this method creates all the necessary intermediate container objects. Refer to lookup string for more information about the strings you can use.
ValueType As PropertyValueTypes
[In] Pass the type of value you want the new subproperty to store.
asArray As Boolean
[In] Pass True to make the new subproperty an array whose elements are of the type you specify in the ValueType parameter.
typeNameParam As String
[In] Pass the name of an existing type if you want to create the new subproperty as an instance of a named type. Otherwise, pass an empty string. If you pass a type name, you must pass PropValType_NamedType for the ValueType parameter. Refer to NamedPropertyTypes for a list of built-in named types.
options As Long
[In] Pass 0 to specify the default behavior, or pass one or more PropertyOptions constants. Use the bitwise-OR operator to specify multiple options. You do not need to pass the InsertIfMissing option to create the new subproperty. Pass DoNothingIfExists if you want the method to not report an error if the subproperty already exists.