TheSwamp

Code Red => .NET => Topic started by: daboho on October 06, 2021, 01:58:38 PM

Title: Get Coordinate From ArrowHead of dimension
Post by: daboho on October 06, 2021, 01:58:38 PM
How to get Coordinate arrowHead Of alignedDimension using C# net autocad
Title: Re: Get Coordinate From ArrowHead of dimension
Post by: gile on October 06, 2021, 05:10:01 PM
Hi,
This should work:
Code - C#: [Select]
  1. public static void GetAlignedDimensionArrowHeadPoints(
  2.     AlignedDimension dim,
  3.     out Point3d arrowHead1,
  4.     out Point3d arrowHead2)
  5. {
  6.     var line = new Line3d(dim.DimLinePoint, dim.XLine1Point - dim.XLine2Point);
  7.     arrowHead1 = line.GetClosestPointTo(dim.XLine1Point).Point;
  8.     arrowHead2 = line.GetClosestPointTo(dim.XLine2Point).Point;
  9. }
Title: Re: Get Coordinate From ArrowHead of dimension
Post by: daboho on October 13, 2021, 05:41:44 PM
thanks @gile
Title: Re: Get Coordinate From ArrowHead of dimension
Post by: daboho on October 15, 2021, 02:29:15 PM
thanks @gile
thanks @gile
sorri gile maybe this very easy for you ?
gile forgive me ,i has to try your code but i am confuse to chek your code
because i can not to append entity line3d to autocad (to check)
but now i am draw line from
point dim.XLine1Point - dim.XLine2Point to dim.DimLinePoint
but my question in my pictrure grip line is line but how can line can get neares point to arrowhead2 and arrowhead1 can you explain,i am sorri am is newbie in net