08-17-2011 03:21 PM
Can you post a sample of the files? I don't think we are talking about the same things here:
In TestStand there is a format and everything for PropertyObject files. They are an actual item. I assumed you were talking about that but your csv comment has me second guessing.
Thanks,
08-17-2011 03:25 PM
Here is a sample file
08-17-2011 03:55 PM
Do your files have to be this format? What's with the SCPI commands in there? Are you expecting to create steps to execute those? Or are they the values, stored in local variables, which then get passed to steps?
Although this can be accomplished I think you are going about it the wrong way. Basically it seems that you want another layer on top of TestStand which interprets your own proprietary file structure.
There is definitely not anything native in TestStand that can take this file and interpret it. You will have to create an engine to do so. This engine will have to read in the file, parse it, understand it and then generate based on it. Which, back to my previous comment, means a whole multitude of API calls.
How do you know what datatype to store them as?
08-17-2011 03:58 PM
Ah, yes the data type. Easily done when manually createing variables, not so easy using a common property file.
Me thinks that I should look into another way (a previous commentor mentioned loading steps with property data, this may be what I need).
In any event it surely doesn't look like its worth the effort to create variable generator.
Thanks for your input,
M
08-17-2011 04:00 PM
There's nothing proprietary about his file structure, that's simply a property loader as a CSV, which the stock property loader supports and will automagically convert types as it is able.
From what I understand, OP has many parameters that need to be UCF but was under the impression that these must be passed in as Locals before they can be used. This is not the case, as demonstrated by the example I referenced, which can load any property you specify.
Correct me if I'm wrong, OP, but the only reason creating variables was brought up was because you had already established what parameters needs to be imported but did not have corrolating Locals created.
08-17-2011 04:54 PM
asbo,
You may be right when you say that is a property loader file. It just didn't really look like one with the SCPI commands in there. I never use the property loader. I find it clugy and annoying. I just use Propery Object files. Of course they could have improved it since 3.0... 🙂
mdewar,
I agree with asbo. You should look at the Property Loader examples that ship with TS. I don't think you want to try and create the variables dynamically. It's too easy to just open the Seq Editor and create them manually. Especially when there's only a couple. or just copy them from the original Sequence File if they are more involved.
08-17-2011 06:01 PM - edited 08-17-2011 06:01 PM
jiggawax,
I don't blame you for thinking they're cludgy (they certainly can be) but we tend to use them for limits/commands/etc we know a customer is going to want to adjust because just about anyone can use Notepad.
I haven't had an opportunity to play with Property Object files, but now that you reminded me, maybe that's how I'll spend my evening 🙂 I only really started using TestStand at 4.0, but talking to other developers I understand that TestStand really didn't come into its own until that version. Take a look, maybe you'll be surprised.