Programming by Dragging Grips (1)
https://www.theswamp.org/index.php?topic=58841.msg617609#msg617609Programming by Dragging Grips (2)
https://www.theswamp.org/index.php?topic=58842.0This time continue to simulate the STRETCH command, drag the grip point, and complete the alignment of the dimension limits.
Operation process for AUTOCAD users:
Code to simulate the STRETCH command: (xdrx-begin)
(xdrx-sysvar-push '("osmode" 545))
(if (and (setq dims
(xdrx
-ssget "\nSelect Dim<Exit>:" '
((0 .
"dim*")))) )
(setq xLine1
(xdrx
-getpropertyvalue dim
"xline1") xLine2 (xdrx-getpropertyvalue dim "xLine2")
)
)
(setq grips
(xdrx
-entity
-getstretchpoint dim
) ints
(xdrx
-points
-sortoncurve
(append int1 int2
)(list gPt0 gPt1
)) )
;|
The corresponding GRIP numbers of dimline1 and dimline2 are 0,1
|;
(xdrx_entity_movestretchpoint dim vec1 0)
(xdrx_entity_movestretchpoint dim vec2 1)
)
)
)
(xdrx-ss->ents dims)
)
)
)
(xdrx-sysvar-pop)
(xdrx-end)
)