Thanks nairolf
I have upgrade to version 1.9.10
I can run a script to have a menu now.
I guess I prefer to use it by an API and
I don't now how. If you have time to explane
I should be very happy.
Currently I'm using 5.70 and have an addin for excel
to make my work as fast as possibly and now I want to
start to convert this to P8. What do you think about that, is API the best way?
Code:
Public Class Menu
<Start()> _
<DeclareAction("Epl8-Info")> _
Public Sub MyInfoAction()
MessageBox.Show("About Epl8-Pro!", "MenuFunction")
Return
End Sub
<DeclareAction("Project-Setup1")> _
Public Sub MyProjectSetup1Action()
MessageBox.Show("Preferences!", "MenuFunction")
Return
End Sub
<DeclareAction("Project-Setup2")> _
Public Sub MyProjectSetup2Action()
MessageBox.Show("Pre-Calculation!", "MenuFunction")
Return
End Sub
<DeclareAction("Project-Setup3")> _
Public Sub MyProjectSetup3Action()
MessageBox.Show("Motor List!", "MenuFunction")
Return
End Sub
<DeclareMenu()> _
Public Sub MenuFunction()
Dim oMenu As New Eplan.EplApi.Gui.Menu()
Dim iMainMenuId As UInteger = oMenu.AddMainMenu("Epl8Pro", "Hjälpprogram", "About Epl8-Pro", "Epl8-Info", "", 1)
Dim iPopupMenu0 As UInteger = oMenu.AddPopupMenuItem("Project-Setup", "Preferences", "Project-Setup1", "Preferences", iMainMenuId, 0, _
False, False)
oMenu.AddMenuItem("Pre-Calculation", "Project-Setup2", "Pre-Calculation", iPopupMenu0, Integer.MaxValue, False, _
False)
oMenu.AddMenuItem("Motor List", "Project-Setup3", "Motor List", iPopupMenu0, Integer.MaxValue, True, _
False)
End Sub
End Class
Wilson11
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP