vba not loading

vba not loading

Anonymous
Not applicable
580 Views
4 Replies
Message 1 of 5

vba not loading

Anonymous
Not applicable
This is my acad.lsp ------------------------------------------------------- (defun S::STARTUP() (command "_-vbarun" "initiateMe") (load "c:/Process.vlx") ) ------------------------------------------------------- I set up my Acad 2002 to load acad.lsp every time it starts a drawing. Most of the times, acad.lsp loads fine as shown below. ------------------------------------------------------- AcadDoc.Lsp loaded ... AutoCAD menu utilities loaded._-vbarun Command: Macro name: initiateMe Command: ------------------------------------------------------- Some times, acad.lsp does not load as shown below. ------------------------------------------------------- AcadDoc.Lsp loaded ... AutoCAD menu utilities loaded._-vbarun Command: ------------------------------------------------------- As you may notice, it does not show: ---------------------------- Macro name: initiateMe Command: --------------------------- Problem seems to lie with "_-vbarun". When this happens, acad hangs in there with no activity. If try to do some thing or close acad, popup windodw says there is still a command active, and it does not accept any other command. The only thing to do it to CTR + ALT +DEL to terminate acad. Can any one have a solution or get-around? Thanks.
0 Likes
581 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hi.
First load the proyect then run the macro

(vl-vbaload "C:\\acad2002\\plans\\drawshape.dvb")
(vl-vbarun "drawshape")

Saludos
Carlos
0 Likes
Message 3 of 5

Anonymous
Not applicable
But my project gets loaded when acad initially starts. "RCRuiz" wrote in message news:32829144.1077901788505.JavaMail.jive@jiveforum2.autodesk.com... > Hi. > First load the proyect then run the macro > > (vl-vbaload "C:\\acad2002\\plans\\drawshape.dvb") > (vl-vbarun "drawshape") > > Saludos > Carlos
0 Likes
Message 4 of 5

Anonymous
Not applicable
Just vbarun. If it is not loaded it will load. If it is it will just run. Heres how I do it in my acaddoc.lsp '//BEGIN CODE BLOCK (defun-q s::Startup () (setvar "CMDECHO" 0) (setvar "FILEDIA" 0) (command "-PSETUPIN" "C:/Program Files/AutoCAD 2002/BLOCKS/C.DWG" "*") (command) (command) (command) (command "-vbarun" "C:/Program Files/AutoCAD 2002/accadoc_draw/Startup.dvb!acadstartup.Startmydwg") ) (Defun C:ZA () (command "Zoom" "E" "Zoom" "0.95x") ) (defun C:CB () (command "-vbarun" "C:/Program Files/AutoCAD 2002/Support/CenterMark/CenterMark.dvb!Main.Run") ) (setvar "FILEDIA" 1) (setvar "CMDECHO" 1) '//END CODE BLOCK It will take short path args if they are in the Acad filepath but mine are spread out and it just makes me feel better knowing excactly which project from which path is being called up. Hope that helps... -- allfro - Chaos Coder Extraordinaire 'site index' (http://www.vbdesign.net/) | please use [ vbcode] \"your_code_here\" [/vbcode ] code tags | be nice | 'augi' (http://tinyurl.com/ytk37) |'go babelfish' (http://tinyurl.com/2j7df) ------------------------------------------------------------------------ allfro's Profile: http://www.vbdesign.net/expresso/member.php?action=getinfo&userid=37 View this thread: http://www.vbdesign.net/expresso/showthread.php?threadid=59839
0 Likes
Message 5 of 5

Anonymous
Not applicable
Jackie, This is from a post by Mark Propst on 02/02/2004 I imagine you already know this, but just in case, do you have an acad.rx file in support path? with one of the following lines acadvba.arx ;(if 2002) ;acvba.arx ;(if 2004) that initializes vba before any macros run -- Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica (sorry, phony e-mail, SPAM made me do it) "jackie" wrote in message news:403f7643$1_2@newsprd01... > This is my acad.lsp > ------------------------------------------------------- > (defun S::STARTUP() > (command "_-vbarun" "initiateMe") > (load "c:/Process.vlx") > ) > ------------------------------------------------------- > > I set up my Acad 2002 to load acad.lsp every time it starts a drawing. > > Most of the times, acad.lsp loads fine as shown below. > ------------------------------------------------------- > AcadDoc.Lsp loaded ... > AutoCAD menu utilities loaded._-vbarun > Command: > Macro name: initiateMe > Command: > ------------------------------------------------------- > > Some times, acad.lsp does not load as shown below. > ------------------------------------------------------- > AcadDoc.Lsp loaded ... > AutoCAD menu utilities loaded._-vbarun > Command: > ------------------------------------------------------- > > As you may notice, it does not show: > ---------------------------- > Macro name: initiateMe > Command: > --------------------------- > > Problem seems to lie with "_-vbarun". > When this happens, acad hangs in there with no activity. If try to do some > thing or close acad, popup windodw says there is still a command active, and > it does not accept any other command. The only thing to do it to CTR + ALT > +DEL to terminate acad. > > Can any one have a solution or get-around? > > Thanks. > > > > > > >
0 Likes