Hi
First thing .......
How far I know it is not possible to control the Horizontal/Vertical distance using "ARRAYPATH" command by selecting a path (Except LINE).....
What @Kent1Cooper advised that is
....
(command "._arraypath" ent "" sel "I" (/ dist1 (abs (cos (angle startpt endpt)))) "F" "")
….
true only for a LINE or a PLINE with 2 vertices (path).... (and also I followed that process in my second post.....). Because this gives the angle by considering only START/END point of any CURVE...... for PLINE more than 2 vertices every segment has its own angle....for SPLINE you have to calculate through every TANGENT point.............
Second Thing ........
In your post each attached image shows only a Rectangular Array along a Line....so there is no array object with rotation.......
If that is your requirement then try this for LINE/PLINE with 2 vertices only.....(To control "Horizontal Distance" only not "Vertical Distance")
(defun C:ARP (/);;Put Variables......
(vl-load-com)
(princ "\nSelect Objects for Array: ")
(setq ent (ssget))
(setq ent_sel (entget (car (setq sel (entsel "\nSelect Array Path (Line or Pline with 2 vertices): ")))))
(if (or (= (cdr (assoc 0 ent_sel)) "LINE") (= (cdr (assoc 0 ent_sel)) "LWPOLYLINE"))
(progn
(if (and (= (cdr (assoc 0 ent_sel)) "LWPOLYLINE") (> (cdr (assoc 90 ent_sel)) 2))
(princ "\nSelected Array Path has more than 2 vertices")
(progn
(setq dst (getdist "\nEnter Distance Between Objects: "))
(setvar "CMDECHO" 0)
(setq pickpt (cadr sel)
path (car sel)
startpt (vlax-curve-getStartPoint path)
endpt (vlax-curve-getEndPoint path)
dst2 (/ dst (abs (cos (angle startpt endpt))))
)
(command "._arraypath" ent "" (osnap pickpt "NEA") "" "" "" "F" dst2 "" "");;Use this or
;(command "._arraypath" ent "" (osnap pickpt "NEA") "" "" "" "F" dst2 "");this
;;The above two line controls the direction & Start point of the array by considerring selection point of path
;(command "._arraypath" ent "" sel "" "" "" "F" dst2 "");;You can use this also or
;(command "._arraypath" ent "" sel "" "" "" "F" dst2 "" "");this
(setvar "CMDECHO" 1)
)
)
)
(princ "\nSelect Line or Pline with 2 vertices only for Array Path")
)
(princ)
)
Lightly tested in AutoCAD 2018......
Debashis Bhunia
Co-Founder of Geometrifying Trigonometry(C)
________________________________________________
Walking is the First step of Running, Technique comes Next....