[Zo...] Posted July 9 Share Posted July 9 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/ Share on other sites More sharing options...
[Ra...] Posted July 9 Share Posted July 9 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152679 Share on other sites More sharing options...
[Zo...] Posted July 9 Author Share Posted July 9 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152689 Share on other sites More sharing options...
[Ra...] Posted July 10 Share Posted July 10 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152719 Share on other sites More sharing options...
[Zo...] Posted July 10 Author Share Posted July 10 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152727 Share on other sites More sharing options...
[Ra...] Posted July 10 Share Posted July 10 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152729 Share on other sites More sharing options...
[Zo...] Posted July 10 Author Share Posted July 10 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152739 Share on other sites More sharing options...
[Ra...] Posted July 10 Share Posted July 10 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 https://qualityforum.zeiss.com/topic/26973-substr-command-not-working-after-upgrading-to-78/#findComment-152757 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