Gammatech Posted July 14, 2010 Share Posted July 14, 2010 Hi, I have been trying to use the DeleteValue action I have two string arrays that get populated by another sequence. Watching the two Arrays I see them get the strings entered one by one. I have an arrangement to set an index value to any position within the array. Watching this value shows it changing correctly. I have an action to a button called 'Delete' that should remove the indexth element from the arrays. Knowing that the array in question and the index are both valid I tried the two possible ways that the DeleteValue action might be used: 1) StringArray = DeleteValue(StringArray,Index) (assuming that it was a function rather like InsertTime) 2) DeleteValue(StringArray,Index) (assuming it was some sort of command) In both cases it throws an Error C1000 channel or function not found. As both the array and the index exist and have watchable values the error must be coming from the inbuilt action. As there are no examples as to the use of this array manipulation tool can you suggest how I should use it to remove an entry from the array? thanks, Martin Link to comment Share on other sites More sharing options...
AzeoTech Posted July 14, 2010 Share Posted July 14, 2010 DeleteValue() is not a built-in function. Its a sequence function in the manual (with source) to demonstrate some array manipulation. Unless you copy that code into a sequence called DeleteValue() in your code, its not going to work. However, you'd be better off just using the variable's member function "RemoveAt", which is built into DAQFactory: stringArray.removeAt(index) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.