SelectOnScreen

SelectOnScreen

Anonymous
Not applicable
2,398 Views
3 Replies
Message 1 of 4

SelectOnScreen

Anonymous
Not applicable
Hello, can we customize the message standart (select objects) from selectonscreen to vba? if so, an example please.
0 Likes
Accepted solutions (1)
2,399 Views
3 Replies
Replies (3)
Message 2 of 4

norman.yuan
Mentor
Mentor

If you mean AcadSelectionSet.SelectOnScreen() method, no, the prompt message cannot be customized.

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4

Anonymous
Not applicable

OK thanks for your answer.
Is it possible a similar command with selectonscreen customizable?
Because (ThisDrawing.Utility.GetEntity returnObj, basePnt, "Select an object") is customizable but selects only one object.

0 Likes
Message 4 of 4

norman.yuan
Mentor
Mentor
Accepted solution

With AutoCAD COM API/VBA, you d not have many choice. One option would be to use AcadUtility.GetKeyword() in conjunction with AcadSelectionSet.Select(). For example, you use keyword to ask user to "pick", or "window", selecting. If it is "pick", you use AcadUtility.GetEntity() in a loop, if it is "window", you ask user to pick 2 points, and if the windows pick is from left to right, you then call AcadSelectionSet.Select acSelectionSetWindow,..., if the window pick is from right to left, you call AcadSelectionSet.Select acSelectionSetCrossing...This way, you can have custom prompt message in GetEntity() or GetPoint()/Corner()...

 

If you plan to or have started moving to AutoCAD .NET API, you would be able to use custom prompt message easily in this situation.

 

Norman Yuan

Drive CAD With Code

EESignature