?
Solved

How can i display a message in the text window using VBA?

Posted on 2009-02-19
4
Medium Priority
?
630 Views
Last Modified: 2013-12-04
I would like to display message in the text window in a VBA application
0
Comment
Question by:BenCalvert
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
darrenmcwi earned 2000 total points
ID: 23689042
You could do something like the attached code.  Also, instead of using SendCommand to call lisp to bring up the Text window, you coulfd use something like SendKeys to push the F2 to the AutoCAD window and bring up the Text Window a little more cleanly.

Alternativel, Lisp has a lot better control over this sort of output. You might have better luck writing Lisp and to wrote what you want and calling that from VBA, or have VBA use another method to display the information to the user better suited to VBA coding like MsgBox.
Sub textscr()
    ' Send To Command Line
    ThisDrawing.Utility.Prompt "This goes to the command line" & vbCrLf
    ' Activate Text Screen
    ThisDrawing.SendCommand "(textscr)(princ)" & vbCr
End Sub

Open in new window

0
 
LVL 10

Expert Comment

by:borgunit
ID: 23693035
also available is

ThisDrawing.Utility.Prompt "YourMessageHere"

0
 
LVL 10

Expert Comment

by:borgunit
ID: 23693053
Oops sorry Darrinmcwi, your code has it already (It looks like a comment on my browser).
0
 

Author Closing Comment

by:BenCalvert
ID: 31548922
This gives me the info I was looking for, thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Our company has proprietary drawing files that we do not give to our customers for final documentation. Our customers now require that we give them these drawings. They understand that they are proprietary and do not require them to be in AutoCAD bu…
The following article will describe how to add/edit a dimension style through AutoCAD VBA. AutoCAD VBA has its quirks and when it comes to dimensions and controlling how they look through VBA.  This is where AutoCAD can be vividly confusing. The…
Integration Management Part 2
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question