11-09-2015 09:57 AM
I'm creating a LabVIEW tool to update several step properties after some needed changes.
One of the changes was a step type went from a numeric limit test to a boolean pass/fail.
Since I couldn't have all of the customers sequences (several hundred) loaded when I made the changes, I need the tool to change the Data Source for this step type from "Step.Result.Numeric" to "Step.Result.PassFail". Problem is I can't seem to find the right combination of properties/methods to make it happen.
I don't see a 'Step.DataSource' property like there is for the 'StatusExpression' and 'Precondition'. I've tried taking the "AsPropertyObject" ref from the Step ref, then using 'SetValString' method to set "Setp.DataSource" to "Step.Result.PassFail", but this returns a -17306 error that returns "Error accessing item 'Step.DataSource'."
Thanks
Ed
Solved! Go to Solution.
11-09-2015 02:28 PM
Ed,
I'm surprised this is not working. Could you post a code snippet of where you are trying to set the DataSource, so that we can see what context you are in? We should be able to come up with an expression to allow you to set the data source.
Thanks!
11-09-2015 02:42 PM
Here's the bit that's causing the issue.
The error is generated in the SetValString method.
So is there no "Step.DataSource" property that can be used?
11-09-2015 02:47 PM
Ed,
Since you are already in a Step context at this point, with the "Step.AsPropertyObject()" call, try passing just "DataSource" as the lookup string, rather than Step.DataSource. I believe that will access the correct property within the Step container.
11-09-2015 02:51 PM
I've made that exact mistake several times on this project. It's always the little things you just overlook.
(and people wonder why I don't like text based languages)
Thanks Daniel
06-24-2021 07:14 PM
How can I find all lookup strings available to request from? , I want to modify other properties from it