Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dimension Overlapping Problem

4 REPLIES 4
Reply
Message 1 of 5
prakasht66
797 Views, 4 Replies

Dimension Overlapping Problem

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.

4 REPLIES 4
Message 2 of 5
adam.nagy
in reply to: prakasht66

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
Message 3 of 5
seansten
in reply to: adam.nagy

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?

Message 4 of 5
adam.nagy
in reply to: seansten

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
Message 5 of 5
seansten
in reply to: adam.nagy

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.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report