PDA

View Full Version : Writing on command line



san_k4
2004-09-02, 08:37 AM
how to write to AUTOCAD command prompt using VBA?
IN Autolisp i used to use princ, prompt etc to achieve this

regards,
SANTHOSH

ntaylor
2004-09-02, 12:18 PM
ThisDrawing.Utility.Prompt

san_k4
2004-09-04, 08:36 AM
works.. but it stands on the same line...i am not able to get a carriage return.

inner69923
2004-09-04, 03:11 PM
ThisDrawing.Utility.Prompt "Hello" & vbCrLf

Ed Jobe
2004-09-07, 04:41 PM
Inner's reply has the right idea, but you will end up with a blank line, no command prompt. It might be what you want, but if you want a clean command prompt, I wrote this function to do just that.
********
Command: vbastmt

Expression: CommandLine "this is a test"
this is a test
Command:
***********


Sub CommandLine(msg As String)
ThisDrawing.Utility.Prompt (msg & vbCrLf & "Command: ")
End Sub

san_k4
2004-09-08, 05:04 AM
That worked ..thanks a lot...
But why vbcr/ vbcrlf not giving the same result.. I am not able to make out…

regards,
SANTHOSH

Ed Jobe
2004-09-08, 02:49 PM
vbCrLf just puts you at the beginning of the next line. So you have to add "Command: " to it to make it look right.