Table of Contents

Method Prompt

Namespace
VectorDraw.Professional.vdObjects
Assembly
VectorDraw.Professional.dll

Prompt(string)

Adds a new string to the prompt stack.

public void Prompt(string str)

Parameters

str string

If this value is null then pop the previous prompt message.

Examples

The following example prompt the user to pick a point on VectorDraw graphics area.

vdDocument doc = vdFramedControl.BaseControl.ActiveDocument;
doc.Prompt("Pick a point");//Display a string on the command line box of vdCommandLine control.
gPoint p1 = doc.ActionUtility.getUserPoint() as gPoint;
doc.Prompt(null);

A string can be also displayed on the vdCommandLine History box without waiting a user action as the following example. In that case the string must begin with '\r\n'

vdDocument doc = vdFramedControl.BaseControl.ActiveDocument;
doc.Prompt("\r\nNumber of Entities in Active Model = " + doc.ActiveLayOut.Entities.Count.ToString());
//Display a string on the command line box of vdCommandLine control.
doc.Prompt(null);

Remarks

Raizes the OnPrompt event.

Every Prompt with a no null string must be followed with a Prompt with null string.

If the vdCommandLine control is visible then it displays the string in the command edit box.

When the passed string is null then the command box is cleared and the previous prompt string is moved to the vdCommandLine History box.

All passed strings are translated before they displayed throw Dictionary