Map API Industry Model Docs |
Public Overrides Sub Button_Click()
Me.Application.OpenUrl("C:\Program Files (x86)\Notepad++\notepad++.exe")
End Sub
It doesn't just open Notepad++. Notepad++ also tries to open a file C:\0:
Notepad++ message when called from Map form |
I couldn't figure out whether OpenURL is a suitable function for calling external apps or not. Instead of using Map API one can use the .Net Framework functionality as well. The following VB.net script launches the external app including certain startup parameters:
Public Overrides Sub Button_Click()
'Haltung auslesen
dim d as Autodesk.Map.IM.Forms.DialogControls.TextBox
dim name_number as String
d = Me.Dialog.Controls.Item("NAME_NUMBER")
name_number = d.Value
dim parameter as String = " /p Q:\KINS\Daten\öffKanal/h " + name_number
'Msgbox( "Aufruf von:C:\Program Files (x86)\KINS\KINS.EXE " + parameter)
'Aufruf
Dim startInfo As New System.Diagnostics.ProcessStartInfo
startInfo.FileName = "C:\Program Files (x86)\KINS\KINS.EXE"
startInfo.Arguments = parameter
Dim pro As New System.Diagnostics.Process
pro.Start(startInfo)
End Sub
Map 2013 SP2
No comments:
Post a Comment