Guest looseLISPSsinkSHIPS Posted February 17, 2010 Share Posted February 17, 2010 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: Private Sub CommandButton1_Click() If CheckBox1 Then ThisDrawing.SendCommand ("(Command ""Flat"")" & vbCr) End If Unload UserForm1 End Sub Private Sub UserForm_Click() End Sub 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: 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? Private Sub CommandButton1_Click() If CheckBox1 Then ThisDrawing.SendCommand ("(Command ""LINE"")" & vbCr) End If Unload UserForm1 End Sub Private Sub UserForm_Click() End Sub Thanks- I belive I had this b4 a few years ago, sothing to do with creating a module in VBA (cant be for sure now)... Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted February 17, 2010 Share Posted February 17, 2010 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: 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??? Because it's not an internally defined command. Try (c:flat) at the command prompt. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.