Registered forum members do not see this ad.
Hi,
I have created a lisp named FLAT.lsp and loaded it with in AutoCAD 2010 I then tested it by typing its command in the command prompt with the result being positive.
I have now scripted a VBA program that is as follows:
Even though the lisp is loaded and its command is working if typed manually, auto cad dose not respond to my call for the function, stating the following at the command prompt:Code:Private Sub CommandButton1_Click() If CheckBox1 Then ThisDrawing.SendCommand ("(Command ""Flat"")" & vbCr) End If Unload UserForm1 End Sub Private Sub UserForm_Click() End Sub
Command: (Command "Flat")
Flat Unknown command "FLAT". Press F1 for help.
How can this be, its calling the exact same command name as what I would type in manually???
Could anybody tell me where my error is I have tried my VBA program with an existing AutoCAD command as follows (which seams to work fine) yet I don’t see the difference?
Thanks-Code:Private Sub CommandButton1_Click() If CheckBox1 Then ThisDrawing.SendCommand ("(Command ""LINE"")" & vbCr) End If Unload UserForm1 End Sub Private Sub UserForm_Click() End Sub
I belive I had this b4 a few years ago, sothing to do with creating a module in VBA (cant be for sure now)...
Last edited by rkmcswain; 17th Feb 2010 at 02:10 pm. Reason: added CODE tags




Registered forum members do not see this ad.
Bookmarks