- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I created a basic code to let me move a polygon choosing one of its line, I just want to set horizontal one of its sides and the whole polygon respect of the chosen line, it doesn't need to be aligned with something, it works, the only thing I'm not able to do is move the things inside of the polygon, must of the time text and blocks.
this is code
(defun c:vert ()
(setq picked_data (entsel "\nPick pline's linear segment: ")
picked_pline (car picked_data)
picked_point (vlax-curve-getclosestpointto picked_pline (cadr picked_data))
picked_param (fix (vlax-curve-getparamatpoint picked_pline picked_point))
p1 (vlax-curve-getpointatparam picked_pline picked_param)
p2 (vlax-curve-getpointatparam picked_pline (1+ picked_param))
p3 (list (car p2) (cadr p1)))
(command "_.align" picked_data "" "_non" p1 "_non" p1 "_non" p2 "_non" p3 "" "_No"))
Solved! Go to Solution.