CAD Forum ► EN ► AutoCAD ► measure different lengths along polyline
Show full version of the posting: measure different lengths along polyline
hi there, does anyone know how I can measure different lengths along a polyline. I have to set blocks at different distances along a polyline ie from 1st block, next is 3m along, 3rd is 3.6m along etc etc .managed to find something that would do it along the curve of the polyline but not on a straight line? help much appreciated
You could always use the copy command and key in the total distance as measured from the first instance of the block's insertion. So you would create copies at 3m, 6.6m, etc.
can't use copy command John, polyline, which is the centre of a corridor, starts off horizontal and then curves upwards in an 'S' shape. I need to plot light fittings at different distances along the polyline following the centre of the corridor
Sorry, can't help you there. Try asking over at the AutoCAD Discussion Group (customization), CADTutor or The Swamp. You'll find more lisp gurus at those sites than you will here. No offense meant to anyone here.
That is certainly possible in an AutoLISP routine. Would you want such a routine to ask the User for the initial location (whether by picking or as a distance from the start) and then the distance to the next for each one, or would you have the spacings in a list, or some other means of defining where they go? It would involve the (vlax-curve-getPointAtDistance) function applied to the Polyline to find the insertion points, using a cumulative distance adding each spacing as it goes along. They can be inserted to align with the local direction of the Polyline (or all at any constant angle relative to it), or all at the same rotation, as you prefer.
See the tip:http://www.cadforum.cz/cadforum_en/qaID.asp?tip=5883and our old LGC utility.
Kent, that's what I was hoping for - picking the start point and then the distance to the next point for each one - have tried one lisp that I found on here but it only picks up on the curve of a polyline and not its entirety
See whether this:
does what you want.