VB.NET-PRINTING VARIABLE VALUE

VB.NET-PRINTING VARIABLE VALUE

cturlington
Collaborator Collaborator
542 Views
1 Reply
Message 1 of 2

VB.NET-PRINTING VARIABLE VALUE

cturlington
Collaborator
Collaborator

Hello,

 

I am using Visual Basic 2013, the Community edition with the Autocad.NET PLUG-IN Wizard installed.

 

I have been working with Lab2 of the Lessons from the Autodesk tutorial series found here: http://adndevblog.typepad.com/autocad/devtv/

 

I have been pondering the following Visual Basic initialization statement to better understand:

 

Dim getWhichEntityOptions As PromptKeywordOptions = New PromptKeywordOptions("Which entity do you want? [Circle/Block:")

 

To test the code as I develop it, I would like to write the value of the variable getWhichEntityOptions as output, either to the command line in AutoCAD or to the Console Window.  If my understanding is correct, I should be able to print to the command line or console window the text string as it is shown in quotes.  However, the ed.WriteMessage() method expects a literal character string in its argument and console.WriteLine() does not appear to respond, perhaps because the code is working inside AutoCAD and not the console window.  Is there a statement I can use that would write the value of the variable getWhichEntityOptions to the command line in AutoCAD or console window?

 

0 Likes
Accepted solutions (1)
543 Views
1 Reply
Reply (1)
Message 2 of 2

Jeff_M
Consultant
Consultant
Accepted solution

PromptKeywordOptions has a number of properties, including Message which would hold the propt string passed to the constructor. So to print this to the command line you would use:

 

ed.WriteMessage(getWhichEntityOptions.Message)

 

Although I'm not quite sure what, exactly, you are going for here...

Jeff_M, also a frequent Swamper
EESignature