View Full Version : Writing on command line
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
2004-09-02, 12:18 PM
2004-09-04, 08:36 AM
works.. but it stands on the same line...i am not able to get a carriage return.
2004-09-04, 03:11 PM
ThisDrawing.Utility.Prompt "Hello" & vbCrLf
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.
Expression: CommandLine "this is a test"
this is a test
Sub CommandLine(msg As String)
ThisDrawing.Utility.Prompt (msg & vbCrLf & "Command: ")
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…
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.
Powered by vBulletin® Version 4.1.11 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.