@_gile
Hi gile, quick question on the Application.Invoke. I am getting an eInvalid input error with mine and I was hoping you could help.
Here is the Lisp where I am trying to pass a value:
(defun c:cedblc ( colorMappingFilePath / )
(command "ConvertPStyles" colorMappingFilePath)
)
(vl-acad-defun 'cedblc)
Here is my call to:
Private Sub ConvertPlotStyles(ByVal lispFilePath As String, ByVal colorMappingFilePath As String)
Try
Dim args = New ResultBuffer(
New TypedValue(CInt(LispDataType.Text), lispFilePath),
New TypedValue(CInt(LispDataType.Text), colorMappingFilePath))
Application.Invoke(args)
Catch ex As Exception
MessageServices.DisplayError("Error Converting Plotstyle!", "Ensure drawing name and path are correct and try again.", ex)
End Try
End Sub
Where lispFilePath = "C:\Program Files\Layer Converter\Support\cedblc.lsp"
And colorMappingFilePath = "M:\Plotting\Plot Styles\Color Mapping.stb"
I am trying to pass the location and file of the .stb to the LiSP as this is something that can change.
I noticed if I pass this "(command "ConvertPStyles" "M:\\Plotting\\Plot Styles\\Color Mapping.stb")" directly into the command line I get the error below. So I don't know if that is the issue, having the full path of the .stb, or my value is not getting passed to the LiSP.
Note: I am using CommandFlags.Session
