Thanks, nice piece.
I do understand logic of this function and it looks better than my piece of code. From other hand I do not use any single function in my scripts and I didn't have any working function and that is probably because when I started programming I didn't have any success on creating functions. At this time I'm nearly running out of ideas and when I will run out of ideas then I will start optimisation of scripts then I will try functions again.
Paste this into your module and try calling MsgBox AngleA(Cmd.GetText (ID, 0)) . You REALLY should use functions in anything that isn´t trivial. It´s not difficult either, if you´ve failed it´s just some minor syntax error.
Function AngleA(Name As String) As Integer
Dim Temp() As String
Temp = Split(Name, "A")
Temp = Split(Temp(1), "B")
AngleA = CInt(Temp(0))
End Function
Well... tried, tried but.... I can't understand what exactly I can't understand. I done copy and paste to my script "Sub Main" but I didn't overcome error.
Could you please to do little script which scan CMM program and display angles A of tip? Maybe it could help me understand where is problem.
I'm receiving message with syntax error but I can't see any error. I'm using pc dmis 15.1, could it be problem for run of functions?