[Zo...] Posted yesterday at 04:39 PM Share Posted yesterday at 04:39 PM i have this program that was running on 6.8 version and now that we have upgraded to 7.8, i have nothing but issues with PCM i have a file that contains point coordinates (file is attached) i read the list A = readListFile(MS_Curve_Points_Temp) // read NX output then i use subStr to seperate teh lines into individual string that i can easily phrase D1 = subStr(A,1,1) this was working up until we upgraded, now i am getting an error can someone please tell what has happened and what can i do to address this issue i tried to convert "A" to text, but it didn't help Greeley appreciate all the help 🙂 13382673_10_fof_zeiss_20_ms_x_Temp.para Link to comment Share on other sites More sharing options...
[Ra...] Posted yesterday at 06:14 PM Share Posted yesterday at 06:14 PM I haven't used Calypso 6.8, but I'm surprised sub string ever worked in this case. instead of D1=subStr(A,1,1) Try: D1=getParameterNamed(A,1) That should give you the first row of the list. 2 Link to comment Share on other sites More sharing options...
[Zo...] Posted 23 hours ago Author Share Posted 23 hours ago Please sign in to view this quote. that worked, thank you very much for the help i just checked few other programs that run the same/similar codes in 6.8 and below and substr seems to be working on those version i personally don't know much coding and use whatever gives me the results 😅 your solution just saved my day and i am thankful Link to comment Share on other sites More sharing options...
[Ra...] Posted 6 hours ago Share Posted 6 hours ago Glad I could help. I would be extremely cautious with the other programs using subStr though. If the context is similar to what you have shown above, I really can't fathom how they are working. Link to comment Share on other sites More sharing options...
[Zo...] Posted 5 hours ago Author Share Posted 5 hours ago this is the portion of the code and in 6.8 worked flawlessly i guess i got lucky with a glitch or something 😁 Link to comment Share on other sites More sharing options...
[Ra...] Posted 5 hours ago Share Posted 5 hours ago I must be missing something. When it's defined as: subStr(X,1,1), I'm under the impression it will only return the first character, not the first row/line. For example. Maybe someone smarter than me can explain why that works in your attached topic? However, don't fix what's not broken. Link to comment Share on other sites More sharing options...
[Zo...] Posted 4 hours ago Author Share Posted 4 hours ago i just ran it in two version to see what i get it seems in my version, it doesn't see the "A" as string and still sees it as a list and returns "D1" also as a list once i converted "A" to string it failed as you suggested Link to comment Share on other sites More sharing options...
[Ra...] Posted 2 hours ago Share Posted 2 hours ago subStr must interact differently with a list than a string. But I get the same error from your first post when trying to parse through a list with subStr. Maybe it has something to do with how the text file is encoded. 🤷♂️ Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in