Only an idea:
Make an OBJECT of 2 lines in similar length and direction with 3 fix-points.
There is the midpoint, you can change PEN & LINETYPE, if you STRETCH midpoint will move, measure will follow, you can LABEL the ID...
From my point it is better to have an object with a midpoint I can trust for measuring than a “real” line with need to check midpoint manually.
Only disadvantage: ROTATION.
(myself never measured a midpoint of a line)
If you are a bit fit in GDL, add HOTLINE2 in the automatic script of AC.
If you are a bit more fit you can eliminate the disadvantage of rotation by using midpoint for 0,0,0 of the object and make dynamic HoSpos at the end corresponding among each other.
Look at selfGDL.com!
Here is the 2d-schript:
!!! Thanks for learning at
www.selfGDL.com 🙂))) greets to JS & FB
!!! copy following in 2D-script
!!! At DETAILS-chapter (1st) : OBJECT-TYPE is "DRAWING-SYMBOL"
!!! At PARAMETER-chapter (2nd from top): make NEW paramater "c" as lenght-type and "d" as length-type
cnt = 1
HOTSPOT2 0,0,cnt : cnt=cnt+1
! Vertikale Richtung
HOTSPOT2 d, 0, cnt ,c,1+128 : cnt=cnt+1
HOTSPOT2 d, c, cnt ,c,2 : cnt=cnt+1
HOTSPOT2 d,-1, cnt ,c,3 : cnt=cnt+1
! Horizontale Richtung
HOTSPOT2 0,c, cnt ,d,1+128 : cnt=cnt+1
HOTSPOT2 d,c, cnt ,d,2 : cnt=cnt+1
HOTSPOT2 -1,c, cnt ,d,3 : cnt=cnt+1
! Vertikale Richtung
HOTSPOT2 -d, 0, cnt ,c,1+128 : cnt=cnt+1
HOTSPOT2 -d, -c,cnt ,c,2 : cnt=cnt+1
HOTSPOT2 -d,1, cnt ,c,3 : cnt=cnt+1
! Horizontale Richtung
HOTSPOT2 0,-c, cnt ,d,1+128 : cnt=cnt+1
HOTSPOT2 -d,-c,cnt ,d,2 : cnt=cnt+1
HOTSPOT2 1,-c, cnt ,d,3 : cnt=cnt+1
LINE2 -d,-c,d,c
HOTLINE2 -d,-c,d,c
END:
!