70002571 Add rotation width height user input in CmdRect

Article 70002571
Type Wish
Product Engine
Version 1102
Date Added 10/4/2024 12:00:00 AM
Fixed 11.3.1.0 (10/25/2024 12:00:00 AM)
Submitted by Ikenna Aniobodo

Summary

Is it possible to ask the user for rotation, width and height during user input in CmdRect?

Solution

In version 11.3.1.0 we improved a little the cmdRect user command as following.
After giving the first point which is the insertion point the user is asked for a second point OR to type (D)imension to the CommandLine. If the dimension command is given then the user is asked for two double values (either from the commandline typing or with mouse clicks selecting the distance) and a rect is created with these measurements as width and height. At the end of the command the user is asked for the rotation of the newlly created rect.
This change also is reflected in the parameters of the command , so now you can create a rect using the cmdRect command without user interference like in the code below by giving the width and height and rotation of the rect

Different ways to call the cmdRect command in c#

doc.CommandAction.CmdRect(new gPoint(5.0, 5.0, 0.0), new vdArray( new double[] { 3.0, 3.0, Globals.HALF_PI / 2.0 }));
doc.CommandAction.CmdRect(null, new vdArray(new double[] { 3.0, 3.0, Globals.HALF_PI / 2.0 }));
doc.CommandAction.CmdRect(new gPoint(5.0, 5.0, 0.0), "user");

Send comments on this topic.