| Article | 70002377 |
| Type | Wish |
| Product | Engine |
| Date Added | 7/12/2023 12:00:00 AM |
| Fixed | 10.1004.0.5 (7/14/2023 12:00:00 AM) |
| Submitted by | Wayne Romer |
Summary
CmdDimContinuous always return false Passed Position to accept "A" "H" 'V" as predefined value with out need the user to prompt for that
Solution
We fixed the return value of the command.
Also we changed the last parameter from double to object and now it can take string values also like below
doc.CommandAction.CmdDimContinuous(false, null, null, null, "A"); //For aligned with the first two points.
doc.CommandAction.CmdDimContinuous(false, null, null, null, "V"); /For vertical
doc.CommandAction.CmdDimContinuous(false, null, null, null, "H"); //For Horizontal
This parameter will initialize the action that is asking for the position of the dimensions with the passed rotation.
Note that if you pass the points by code you can still use this parameter as double value to set the rotation of the dimensions like below.
//Call the command passing all parameters and create 4 dimensions
gPoints firstPoints = new gPoints();
firstPoints.Add(0, 0, 0);
firstPoints.Add(5, 0, 0);
gPoint position = new gPoint(2.5, 5, 0.0);
gPoints restPoints = new gPoints();
restPoints.Add(new gPoint(10, 0, 0));
restPoints.Add(new gPoint(20, 0, 0));
restPoints.Add(new gPoint(30, 0, 0));
doc.CommandAction.CmdDimContinuous(true, firstPoints, position, restPoints, Globals.DegreesToRadians (30));
//And same vertical
firstPoints = new gPoints();
firstPoints.Add(0, 0, 0);
firstPoints.Add(0, 5, 0);
position = new gPoint(-2.5, -2.5, 0.0);
restPoints = new gPoints();
restPoints.Add(new gPoint(0, 10, 0));
restPoints.Add(new gPoint(0, 20, 0));
restPoints.Add(new gPoint(0, 30, 0));
doc.CommandAction.CmdDimContinuous(false , firstPoints, position, restPoints , Globals.HALF_PI);
