Author Topic: Get Coordinate From ArrowHead of dimension  (Read 389 times)

0 Members and 1 Guest are viewing this topic.

daboho

  • Newt
  • Posts: 27
Get Coordinate From ArrowHead of dimension
« on: October 06, 2021, 01:58:38 PM »
How to get Coordinate arrowHead Of alignedDimension using C# net autocad

gile

  • Water Moccasin
  • Posts: 2290
  • Marseille, France
Re: Get Coordinate From ArrowHead of dimension
« Reply #1 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. }
« Last Edit: October 06, 2021, 05:14:23 PM by gile »
Speaking English as a French Frog

daboho

  • Newt
  • Posts: 27
Re: Get Coordinate From ArrowHead of dimension
« Reply #2 on: October 13, 2021, 05:41:44 PM »
thanks @gile

daboho

  • Newt
  • Posts: 27
Re: Get Coordinate From ArrowHead of dimension
« Reply #3 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