Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone:
Is it possible to direction and alignment of leaders slightly intelligently?
Solved! Go to Solution.
Hi everyone:
Is it possible to direction and alignment of leaders slightly intelligently?
Solved! Go to Solution.
Partway there, though all on the same side of the Polyline: replace this line:
(command "leader" (car ptlist) (polar (car ptlist) (dtor 135) dis) "" "" "" mt "")
with this:
(command "leader"
(car ptlist)
(polar (car ptlist)
(+
(angle
'(0 0)
(vlax-curve-getFirstDeriv pl
(vlax-curve-getParamAtPoint pl (car ptlist))
); ...Deriv
); angle
(/ pi 2)
); +
dis
); polar
"" "" "" mt ""
); command
Which produced this in your sample drawing:
But to get it to go toward the outside of the local bending or curving direction at each location would be a challenge. It's a question of determining whether the + at line 4 should be - instead, based on the way the direction changes at the vertex. It would likely mean a different way of stepping through the 'ptlist' variable, to retain access to the previous vertex for an angle comparison, but maybe there's a way around that. And when the change in direction crosses the 0° direction, which happens several times in the example, things need to be calculated differently.