Adding custom text to command Prompt.
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Adding custom text to command Prompt.

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
srinivasan
Guest





Posted: Wed Mar 16, 2005 10:03 am    Post subject: Adding custom text to command Prompt. Reply with quote

Dear all

I like to send some text back to the command Prompt.
For example i am getting a point using get point and second point using the same get point method,so that the command prompt looks like

command: Select start point:
command: Select End point:

Now what i require is to calculate the distance and put the distance back to the command prompt like this,

command: Select start point:
command: Select End point:"distance 50"

I tried with prompt but it displays in the next line.
command: Select start point:
command: Select End point
:"distance 50"

Can the string be appended to the existing command line.

Thanks in advance.
Regards
Sri

Back to top
viswanathan
Guest





Posted: Thu Mar 17, 2005 10:04 am    Post subject: Re: Adding custom text to command Prompt. Reply with quote

Hi,

Try with this code.

Sub Ch4_GetStringFromUser()
Dim retVal As String
retVal = ThisDrawing.Utility.GetString(1, vbCrLf & "Enter your name: ")
Dim retVal1 As String
retVal1 = ThisDrawing.Utility.GetString(1, "Select End point:distance 50")
End Sub

viswanathan.s
Back to top
srinivasan
Guest





Posted: Thu Mar 17, 2005 3:45 pm    Post subject: Re: Adding custom text to command Prompt. Reply with quote

thanks

but this not what i am looking for.
Here it is only a prompt message we are sending.
But iwhat i am looking is to change the previous
prompt messge.

regards
Sri

Back to top
Alfred NESWADBA
Guest





Posted: Fri Mar 18, 2005 2:22 am    Post subject: Re: Adding custom text to command Prompt. Reply with quote

In article <21916280.1111056331169.JavaMail.jive@jiveforum2.autodesk.com>, nospam@address.withheld says...
Quote:
thanks

but this not what i am looking for.
Here it is only a prompt message we are sending.
But iwhat i am looking is to change the previous
prompt messge.

regards
Sri

hi


when the user made the endpoint-click autocad sends a CrLf to the textline, so the current line is lost for access, because autocad switched to the
next line (except when the user inputs coordiantes via keyboard and finished the input with <space>).

with ThisDrawing.Utility.Prompt you have only the choice of making output to the current-textline (inkluding chr(08) for <backspace>).

- alfred -
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB