Hey Scope,
Please create a new topic if your questions is unrelated to the original topic,
this is alot easier to search for other users.
I created a new topic from your response.
I extended your code to show how you can get the ordinal of the enum contained
in the signal assigned to your Value-Edit:
Code: Select all
Sub GetValueEditEnumOrdinal()
Dim panel, temp, assignedenum, index, tempval
Set panel = Documents("HMI-Internal_CAN.ipf").ActiveWindow.Object
Set temp = panel.Scenes(1).Controls("ve1")
set assignedenum = temp.Signal.Enum
tempval = temp.Value
index = assignedenum.FindOrdinal(tempval)
PrintToOutputWindow index
End Sub
As you can see, i use the current value of the Value-Edit to get the Ordinal via ENUM.FindOrdinal