PromptPointOptions with no message always prints a colon (:)

PromptPointOptions with no message always prints a colon (:)

tipitasa
Enthusiast Enthusiast
373 Views
2 Replies
Message 1 of 3

PromptPointOptions with no message always prints a colon (:)

tipitasa
Enthusiast
Enthusiast

Hi, 
I would like to use a PromptPointOptions with no message.
I use it when user clicks a button and I always get a colon printed to the command line. They even keep stacking in the same line.

 

 

PromptPointOptions pPick = new PromptPointOptions("");
pPick.Message = "";  // this line does not change anything

 

 

 

I do change some system variables before calling the prompt, but this should not have any effect.

 

 

            // Set PolarMode to include 1 + 4
            // ("Relative to last segment" and "Additional angles")
            Application.SetSystemVariable("POLARMODE", 5);
            // set AUTOSNAP to include everything
            Application.SetSystemVariable("AUTOSNAP", 63);
            Application.SetSystemVariable("ANGBASE", inLineAngle);
            Application.SetSystemVariable("ANGDIR", 1);

 

 

 


This is how picking the point looks like with Dynamic Input on or off. The colon is always here. If I add a message to the prompt, it just shows before the colon.

tipitasa_1-1695645952166.png 

tipitasa_2-1695645961818.png


And the command line, see the colons:

tipitasa_3-1695646065755.png

0 Likes
Accepted solutions (1)
374 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor

Firstly, it is always good to provide a meaningful prompt and command line when you expect user to interact to the editor, even the action is initialized from a dialog box when user click the button "Pick Point >". Imaging this: after user clicks the button, the dialog is hidden, before the user picks the point, he/she gets a phone call for lengthy talk. When the talk is done, he/she is facing the Acad editor with empty command line and could not figure out where he/she was left.

 

Anyway, using empty prompt or not, you should ALWAYS start the prompt with new line ("\n"):

 

PromptPointOptions pPick = new PromptPointOptions("\n");

or

PromptPointOptions pPick = new PromptPointOptions("\nSelect a point:");

 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

tipitasa
Enthusiast
Enthusiast
Accepted solution

The colon remains even with the new line.

For now, I solved my problem by using the NOMUTT system variable. Nothing gets printed to the command line. However the colon still remains in the field next to the mouse when picking a point, so I've set the 'Pick a point' message to be shown there.

 

object nomutt = Application.GetSystemVariable("NOMUTT");
Application.SetSystemVariable("NOMUTT", 1);

PromptPointOptions pPick = new PromptPointOptions("Pick a point");
//...

// restore system variable
Application.SetSystemVariable("NOMUTT", nomutt);

 

 
If somebody knows of how to omit the colon without using the NOMUTT, the answer is stil welcome.

0 Likes