jakebullet70 Posted March 24, 2009 Posted March 24, 2009 Hi all (AutoCad 2007) I am trying to run VBA code from the command line by using just CTAG as the name. In searching the net seems like I need a small lisp function. I dug up this code off of the net and put it in the acad2007.lsp file Defun C:CTAG() (vl-vbarun "C:\\TestProject.dvb!Blocks.InsertBlockS") ) While it sort of works... It runs my program on startup but I don't want that, I just want it to run when I use the command line and type CTAG. But when I do this it says it cannot find the command. hhhmmmm.... I think I am close but what am I doing wrong? Thanks all! Quote
Lee Mac Posted March 24, 2009 Posted March 24, 2009 I know very little about VBA, but could it be that you missed the first parenthesis? [b][color=Red]([/color][/b]Defun C:CTAG() (vl-vbarun "C:\\TestProject.dvb!Blocks.InsertBlockS") ) Quote
jakebullet70 Posted March 24, 2009 Author Posted March 24, 2009 thanks!!! Yep, as simple as a missing parenthesis!!!! Quote
kon Posted March 25, 2009 Posted March 25, 2009 that's a relief! I also go over w/ those dilemmas... careless;P Quote
Lee Mac Posted March 25, 2009 Posted March 25, 2009 thanks!!! Yep, as simple as a missing parenthesis!!!! I'm assuming from a missed parenthesis mistake that you don't use the Visual LISP Editor in ACAD to create your LISP files - if not, I would definitely recommend it, just type VLIDE at the command line. Debugging options there as well. Quote
Lee Mac Posted March 25, 2009 Posted March 25, 2009 More info on how to use VLIDE here. http://www.midpointcad.com/au/docs/lakose_The_Visual_LISP_Developers_Bible.pdf Quote
jakebullet70 Posted March 25, 2009 Author Posted March 25, 2009 More info on how to use VLIDE here. http://www.midpointcad.com/au/docs/lakose_The_Visual_LISP_Developers_Bible.pdf VERY cool! thanks! Quote
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.