Your Products have been synced, click here to refresh
I think if you make sure the variable initially holds a valid subname it won't error.
On starting execution it's just running a check that the CALLSUB points to a valid location.
This seems to work for me:
[B]ASSIGN/MYSUBNUM="1"[/B] FPTR =FILE/OPEN,C:\Temp\SubNum.txt,READ V1 =FILE/READLINE,FPTR,{mysubnum} FILE/CLOSE,FPTR,KEEP ASSIGN/MYSUBNUM="SUB"+MYSUBNUM CS1 =CALLSUB/MYSUBNUM,C:\Users\Public\Documents\Hexagon\PC-DMIS\2023.1\SubLibrary.PRG:,
Where as this didn't (and I go t the same error you mention)
[B]ASSIGN/MYSUBNUM=""[/B] FPTR =FILE/OPEN,C:\Temp\SubNum.txt,READ V1 =FILE/READLINE,FPTR,{mysubnum} FILE/CLOSE,FPTR,KEEP ASSIGN/MYSUBNUM="SUB"+MYSUBNUM CS1 =CALLSUB/MYSUBNUM,C:\Users\Public\Documents\Hexagon\PC-DMIS\2023.1\SubLibrary.PRG:,
I think if you make sure the variable initially holds a valid subname it won't error.
On starting execution it's just running a check that the CALLSUB points to a valid location.
This seems to work for me:
[B]ASSIGN/MYSUBNUM="1"[/B] FPTR =FILE/OPEN,C:\Temp\SubNum.txt,READ V1 =FILE/READLINE,FPTR,{mysubnum} FILE/CLOSE,FPTR,KEEP ASSIGN/MYSUBNUM="SUB"+MYSUBNUM CS1 =CALLSUB/MYSUBNUM,C:\Users\Public\Documents\Hexagon\PC-DMIS\2023.1\SubLibrary.PRG:,
Where as this didn't (and I go t the same error you mention)
[B]ASSIGN/MYSUBNUM=""[/B] FPTR =FILE/OPEN,C:\Temp\SubNum.txt,READ V1 =FILE/READLINE,FPTR,{mysubnum} FILE/CLOSE,FPTR,KEEP ASSIGN/MYSUBNUM="SUB"+MYSUBNUM CS1 =CALLSUB/MYSUBNUM,C:\Users\Public\Documents\Hexagon\PC-DMIS\2023.1\SubLibrary.PRG:,
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |