Message 1 of 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello together,
since update to latest 2023.2 from 2021 the API method RotateSketchObjects from sketch object does nothing.
The following code wasn't altered for 2 years now and doesn't rotate the textbox anymore.
double dY = Endpoint.Y - Startpoint.Y;
double slope = dY / dX;
double TextboxAlignAngle = dX != 0 ? Math.Atan(slope) : Converter.rad_grd(false) * 90;
ObjectCollection objectCollection = GD.InvAPP.TransientObjects.CreateObjectCollection();
objectCollection.Add(textBoxBend);
sketch.RotateSketchObjects(objectCollection, textBoxBend.Origin, TextboxAlignAngle);
since the preferred approach ...
// Exception for angles other than 90 and 180°
// textBoxBend.Rotation = TextboxAlignAngle;
... will throw an exception for angles except 0,90,270,360
The above was the way it worked.
Is there another way to rotate textboxes in 2023 API?
Thank you in advance!
BR
Solved! Go to Solution.