bentraje Posted November 18, 2021 Share Posted November 18, 2021 (edited) Hi, Is there a way I can change the string attribute to an int attribute. For example, base data is BEFORE ptnum, name 1, joint_a_sel, 2, joint_b_sel, 3, joint_d_sel, 4, joint_a_sel, 5, joint_c_sel, resulting data would be like AFTER ptnum, name, name_int 1, joint_a_sel, 1 2, joint_b_sel, 2 3, joint_d_sel, 4 4, joint_a_sel, 1 5, joint_c_sel, 3 I'm not sure what's the proper nomenclature for this task but hopefully the before and after makes it clear. Is there a way around this? P.S. AFAIK, the atof() expression is only for strings that already looks like a number but is labelled as a string. Edited November 19, 2021 by bentraje Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted November 18, 2021 Share Posted November 18, 2021 Hi, a quick and dirty way: push all strings into one array (once per string) and return index foreach string. string_to_number.hipnc 1 Quote Link to comment Share on other sites More sharing options...
bentraje Posted November 19, 2021 Author Share Posted November 19, 2021 Hi @Aizatulin Thanks for the illustration file. Works as expected. Learned about find and push expressions 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.