select matching strings through wrangle

   914   0   0
User Avatar
Member
125 posts
Joined: April 2014
Offline
I am trying to find the location of matching strings within an array.
The string to match is on the first input and the string array to match items to is on the second input of the wrangle.

My ultimate goal is take the matching string index(s) and use that to drive which instance(s) are attached to the point.

The string data for both inputs is imported from a .csv if that makes any difference

Here is my code attempt. I seem to have a syntax error in the find statement but have been unable to find an example to compare it to.

I beg forgiveness as I know this is probably way off what I really need to do.



int useInst; //instance index (to be used to add geometry instance to point)
string whichInst; //first input string(s) array
string instArray; //second input string(s) array

s@instArray = point(1, “inst”, @ptnum); // build array of strings from second input

i@useInst = find(@instArray; @whichInst) // find array index of matching string.


thanks for any suggestions
  • Quick Links