Dimension Overlapping Problem

Dimension Overlapping Problem

Anonymous
Not applicable
1,090 Views
4 Replies
Message 1 of 5

Dimension Overlapping Problem

Anonymous
Not applicable

Hi ,

Is it possible to avoid dimension overlappinng in drawing ?

To be precise ,i want to find out the dimensions which is overlapping with notes & balloons after updating the model with parameters.So that i can able to move the particular dimension to empty area.here i have attached the images.is there any API functionalities supports for this,please let me know.

0 Likes
1,091 Views
4 Replies
Replies (4)
Message 2 of 5

adam.nagy
Autodesk Support
Autodesk Support

Hi,

 

Sorry, but I'm not aware of such functionality, so you'd probaly have to check the various parts of dimensions, etc, and use the transient geometry classes to see how far they are from each other: e.g. LineSegment2d.DistanceTo()

 

Cheers,

 

 



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 5

Anonymous
Not applicable

Hello. I have the same problem. This sounds complicated to say the least. Do you know of anyone who has been successful in using this method to detect dimension overlap in drawings?

0 Likes
Message 4 of 5

adam.nagy
Autodesk Support
Autodesk Support

These are the comments I got from colleagues:

>>>>>

a)

There isn’t direct way to do so as I know. The work around in my mind is:  

For dimensions or Note, we can get GeneralDimension.Text.RangeBox or HoleThreadNote.Text.RangeBox or ChamferNote.RangeBox, and use Box2d.IsDisjoint() to judge whether there is text intersection between them. We need check the relative property of each object since they are not always have the same hierarchy.  

 

For the ones which don’t have RangeBox Property like Balloon, we can use their Position of Point2d type instead. Using Point2d.DistanceTo() to get their distance between each other, or using Box2d.Contains(Point2d) to judge whether the point it in RangeBox of another object.

 

b)

There seems no a good way to detect all the drawing annotations if their texts are overlapped. For the dimensions and some other annotations(like GeneralNote, LeaderNote, HoleThreadNote, ChamferNote, PunchNote, BendNote etc.) that have the RangeBox(Box2d) property which can help to determine if they are overlapped at the text area, but for some other symbols(like SketchedSymbol, FeatureControlFrame, SurfaceTextureSymbol, Balloon etc.) that have only Position property which are not able to get their text range box we can’t detect if they have text overlapped at present.

 

Currently we have the DrawingDimensions.Arrange method which can help to relocate the specified dimensions to make them look in better order. For dimensions and other annotations which have RangeBox property you can use Box2d.IsDisjoint to check if the two texts are overlapped.

 

For the case from the user forum it is a Balloon and DrawingDimension, the Balloon has Position(Point2d) property and we can use Box2d.Contains(Point2d) to check if the Balloon’s text is overlapped with the dimension text. This is not always good but can work for some cases.

<<<<<



Adam Nagy
Autodesk Platform Services
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you Adam. I will try your idea this week with GeneralDimension.Text.RangeBox with Box2d.IsDisjoint() in a loop to find all dimension text boxes that overlap other dimensions in the drawing.


0 Likes