Thanks Dennis,
I actually just ended up creating a command using the <ListFunction> tag instead of the <CommandMethod> tag and it seems to do what I needed. I'm attaching the code incase anyone else runs into the same request.
Code:
If you need to create a custom autocad command that takes parameters the <CommandMethod> tag does not allow parameters.
BUT…
You can declare your custom command as a Lisp Function which can take parameters (but doesn’t have to) as follows:
<LispFunction("MyFunction")> _
Public Sub MyFunction(ByVal Args As ResultBuffer)
‘check if any parameters
If Not Args = Nothing Then
'step through the parameters
For Each rb As TypedValue In Args
'check the param type
If (rb.TypeCode = Autodesk.AutoCAD.Runtime.LispDataType.Text) Then
'do something if text
End If
If (rb.TypeCode = Autodesk.AutoCAD.Runtime.LispDataType.ObjectId) Then
'do something if ObjectID
End If
Next
End If
End Sub
To call the command from the command line enclose the command in parens as follows:
(MyFunction “myText”)
This calls the MyFunction command with a single text param = “myText”
Mike Robertson
FL. Dept. of Transportation
CADD Applications Developer