hi i have a scr file in a particular location say :d/test.scr , i want to run this file in autocad but not by opening autocad but by opening a excell document thru vba code any one knows code to run scr file in autocad ,
i know code to open autocad from the excel...
plse help asap ...
thank you inadvance. :smileywink
Solved! Go to Solution.
Solved by Alfred.NESWADBA. Go to Solution.
Hi,
if you know the code that opens and accesses AutoCAD from Excel-VBA then run your scr by using SendCommand("_SCRIPT" & vbcr & ...).
HTH, - alfred -
hi i thank you fr your reply if i use send command option i need to press enter in autocad command prompt to execute the command passed so tell me some solution regarding how can i elimate manual input required to start the command passed .
ex
acad.activedocument.sendcommand("line" )
above code display line command in autocad commandprompt but i have to give enter to start the command line passed any one help me how can i avoid using enter key to start the autocad.
Hi,
Change your line to:
acad.activedocument.sendcommand("line" & vbCr)
- alfred -
hi pal what if i have to run a autolisp custom command say "check"and i use the code
Acad.activedocument.sendcommand("check" & vbCr )
the above code doesn't work it shows ; error: bad argument type: VLA-OBJECT nil
can any one solve this
but if i type check in autocac command prompt and press enter by autolisp command check works ....
Hi,
>> if i have to run a autolisp custom command say "check"and i use the code
>> Acad.activedocument.sendcommand("check" & vbCr )
Can you please describe a little bit more detailed what you like to do exactly?
Because you say you run an AutoLISP command ... but what you show is a VB/A syntax.
From LISP the call of a line (if you need to use "command") is:
(command "_LINE")
- alfred -