How to insert a block along a polyline with equal linear ( horizontal) spacing?

How to insert a block along a polyline with equal linear ( horizontal) spacing?

Anonymous
Not applicable
2,025 Views
6 Replies
Message 1 of 7

How to insert a block along a polyline with equal linear ( horizontal) spacing?

Anonymous
Not applicable

I want to insert a block along a polyline with equal horizontal distance. Using path array it is not fixing at my grid lines (intersecting points). 

 

I attached the screenshot.

 

please help me....

 

 

Regards

 

Thangaraj P

0 Likes
2,026 Views
6 Replies
Replies (6)
Message 2 of 7

DannyNL
Advisor
Advisor

Horizontal spacing maybe 20 but that is not the distance from one copy to the other (> 20).

You can use the array path option, but use the MEASURE option to set the distance between the first and second copy by selecting the intersecting point of your polyline and grid.

 

BTW, this will only work if your polyline is a straight line and not if there are bends or curves. In that case it is not possible to use the array command as far as i know.

0 Likes
Message 3 of 7

Ethan_Gale
Contributor
Contributor

I know your post is from a long time ago, however I created a lisp routine recently to do just what you wanted.  see the attached routine and hope it is helpful!

 

0 Likes
Message 4 of 7

shokitali1980
Contributor
Contributor

hello Eathan.

 i have poly line which edge of pathway and i wanna place some light poles blocks along the edge at a constant offset and equal spacing

may i have any assistance 

0 Likes
Message 5 of 7

jreidKVSUZ
Advocate
Advocate

You must be doing something wrong with the Measure command.
I made a block called BALL (RED). I made the grid the same as your grid.
Then this is what I typed:
Command: MEASURE
Select object to measure: (PICK YOUR LINE)
Specify length of segment or [Block]: B
Enter name of block to insert: BALL
Align block with object? [Yes/No] <Y>:
Specify length of segment: END (I PICKED THE LEFT SIDE OF THE LINE)
of Specify second point: INT of <Ortho off> (TURNED OFF ORTHO AND PICKED 2ND POINT OF LINE)

 

Now it should have drawn what you want. For some reason, it does not go to the first picked point, but this gets you where you want to be.
This will work on PLINES CURVED. And it will give you the exact distance you pick, but as we know curves takes longer time to get there then as a bird flies straight. But still a great tool for PLINES CURVED to place your blocks with the same distance between them.

 

Hope this helps! If so, Please Select the Solved Button.
JRR!

jreidKVSUZ_0-1738084847119.png

 

0 Likes
Message 6 of 7

jreidKVSUZ
Advocate
Advocate

SHOKITALI1980,

You want to use the same as I posted below using the MEASURE command.
Offset you Pathway (Road) line as you call it to your distance need the Poles to be from the let’s say Road.
Make your Pole Block. Then type the command as posted above but you will MANUALLY TYPE YOUR DISTANCE between your Poles vs picking the distance.

 

Hope this helps! If so, Please Select the Solved Button.
JRR!

0 Likes
Message 7 of 7

Sea-Haven
Mentor
Mentor

Need a custom lisp very easy you can use getpointatdist function then also get the angle of the pline say at that point then can insert a block at a set distance  off the original line. I did something recently will try to find again.

 

(defun c:blkpl ( / oldsnap dist interval obj and node-pt )
(defun alg-ang (obj pnt)
  (angle '(0. 0. 0.)
     (vlax-curve-getfirstderiv
       obj
       (vlax-curve-getparamatpoint
         obj
         pnt
       )
     )
  )
)
(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(setq interval (getreal "\nEnter distance "))
(setq dist interval)
(setq off (getreal "\nEnter offset "))
(setq blk (getstring "\nEnter block name " T))
(setq obj (vlax-ename->vla-object (car (entsel "\nPick pline object "))))
(setq len (vlax-get obj 'length))
(while (<= dist len)
    (setq node-pt (vlax-curve-getpointatdist obj dist))
	(setq ang (alg-ang obj node-pt))
	(setq node-pt (polar node-pt (+ ang (/ pi 2)) off))
	(command "-insert" blk "s" 1 node-pt ang)
	(setq dist (+ dist interval))
)
(setvar 'osmode oldsnap)
(princ)
)
(c:blkpl)
0 Likes