Can I rotate radius general dimension in drawing

Can I rotate radius general dimension in drawing

tim11_manhhieu
Advocate Advocate
132 Views
5 Replies
Message 1 of 6

Can I rotate radius general dimension in drawing

tim11_manhhieu
Advocate
Advocate

Hi experts, I want to rotate  radius general dimension like a below image by picking.

 

tim11_manhhieu_0-1754530359647.png

 

0 Likes
133 Views
5 Replies
Replies (5)
Message 2 of 6

jake_egley
Advocate
Advocate

Here's a similar question. Unfortunately it looks like there is no way to automate that process.

Jake Egley
Inventor 2022
Message 3 of 6

tim11_manhhieu
Advocate
Advocate

thank you for your reply.

0 Likes
Message 4 of 6

tim11_manhhieu
Advocate
Advocate

Can I get the coordinates A or B or information of this curve,

is there any way to convert geometry intent to curve?

I'm trying to converting newGeometryIntent to Curve.

I want to know the coordinates of the curve, from the coordinates of the curve can calculate the coordinates of the dim text origin so that it forms a 45 degree angle.

My whole idea is:

Create a new radius dimension, reuse the geometry intent of the old dimension, delete old dim.

45 degree angle will be created from the coordinates of the geometry intent and oDim.text.origin

 

GeneralDimensions.AddRadius( TextOrigin As Point2d, Intent As GeometryIntent, [ArrowheadsInside] As Boolean, [LeaderFromCenter] As Boolean, [Jogged] As Boolean, [DimensionStyle] As Variant, [Layer] As Variant ) As RadiusGeneralDimension

 

tim11_manhhieu_0-1754616021081.png

 

 

Sub zzz()

Dim doc As DrawingDocument
Set doc = ThisApplication.ActiveDocument

Dim oSheet As sheet
Set oSheet = doc.activeSheet

Dim oDim As RadiusGeneralDimension
Set oDim = ThisApplication.CommandManager.Pick(kDrawingDimensionFilter, "Pick dimension")

Dim newDim As RadiusGeneralDimension

Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry

Dim newGeometryIntent As GeometryIntent
Set newGeometryIntent = oDim.Intent '<--- stuck here

End sub

 

0 Likes
Message 5 of 6

WCrihfield
Mentor
Mentor

That is getting into some grey area, but the GeometryIntent object has some properties we can use, which may help.  First check its GeometryIntent.IntentType property, which will return a variation of the IntentTypeEnum.  If its type is kGeometryIntent, then you may be in luck, and we can move on to getting the value of its GeometryIntent.Geometry property, which just returns a generic Object type.  Its documentations specifies that Type, because it can return many different Types of objects.  So, usually a large, multi-faceted block of code is often needed at this point, to test which Type of object it returned, then respond with custom blocks of code for dealing differently with each different Type it might have returned.  In your case, you likely just want the 'DrawingCurve' or 'DrawingCurveSegment' types, which are possible.  That would be the 2D geometry that exists within the view, on that sheet, for some sort of geometry in the model.  If/when you have that, you have properties for start point, end point, and potentially mid point, as well as other properties for further inspecting its geometry.  However, the other Point involved (the text placement point) is often not in a straight line with the tip of the pointer, due to 'styles' settings of whatever type of dimension or annotation you are working with.  The text is often over the line, under the line, or at the end of a flat, landing line, to keep it at a readable angle, so getting the 'perfect' 45 degree line will still be challenging.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 6 of 6

tim11_manhhieu
Advocate
Advocate

thank you.

0 Likes