Split polylines into equal segments!

Split polylines into equal segments! AutoCAD Tips

Divide polylines, arcs etc.

We are going to look at one common problem that many of the AutoCAD users can already solve. However I will try to offer some additional information.

Our task will be to divide polyline into X parts, or to devide it into parts of XX units.
For example, we have fance and we want columns every 10 meters. We will look at how to find where those 10 meters are.
Another example is if we want to Divide our polyline (or spline) into 5 equal parts to see what is their length.

AutoCAD has lots of tools build in and by using MEASURE and DIVIDE commands we can solve our problems. By default, these commands use AutoCAD points to mark lengths. But we can set them up to place blocks of our choice, they also provide the option to align our blocks to the polyline. However if you decide to place point objects it would be good if you set up point style first. If you are going to use blocks you will need to create one first and be sure that the block’s insertion point is right where you want it to be!

DIVIDE

The DIVIDE command places points or blocks Dividing our objects into equal parts. It’s important to notice that this command won’t affect the object in any way! How to use it:

  1. Firstly we type in command line DIVIDE
  2. AutoCAD will ask us to select object to divide. Here we can select our Polyline/spline/line object.
  3. After selecting the objects two options would be given to us. Either to Enter the number of the segments or [Block]. If we want to use point objects we can type the number and hit enter, if we want to use Block we hit “B“.
  4. If we use Block option, at Enter name of block to insert: we just type in the name (tip: choose easy names so you can remember them). At the Align block with object? We can go either Yes or No it depends on our goal. At Enter number of segments: We enter the number.
    Split polylines into equal segments! AutoCAD Tips

MEASURE

The MEASURE command is similar to the DIVIDE command, but places the points or blocks at a spacing your specify. It doesn’t affect the object either! How to use it:

  1. Firstly we type in command line MEASURE
  2. AutoCAD will ask us to select objects to measure. Here we can select our Polyline/spline/line object.
  3. After selecting the objects two options would be given to us. Either to Specify the distance between points or [Block]. If we want to use point objects we can type the number and hit enter, if we want to use Block we hit “B”.
  4. If we use Block option, at Enter name of block to insert: we just type in the name. At the Align block with object? We can go either Yes or No. At Specify length of segment: We enter the length.
    Split polylines into equal segments! AutoCAD Tips

Lisp routine

Measure and Divide work great in most of the cases, however some times we want not only to see the different segments, but to break our line there. This can be done very easily with one small lisp. Which works just like Measure and Divide commands, the only difference is that it breaks our polylines. How to use it:

  1. We have to Download the Lisp from Here.
  2. We load the Lisp by typing Appload in command line and choosing it.
  3. The two commands that can be used are DIVCUT and MESCUT. Divcut will work as divide – gives us the option to choose number of segments. Mecut will work as measure – gives us option to choose the length of segment.
  4. After entering the command we have to choose the object we want to break. Upon choosing it AutoCAD will ask us either to Enter number of segments or Specify length of segment.
    Split polylines into equal segments! AutoCAD Tips

Note: The Lisp can be used with Splines too, but it will turn the Spline into 2D Polyline.

Lisp is created by great French guy Gilles from cadxp.com if you like the lisp and want to help developer in his work feel free to contact him!

The only thing I decided to change is the prompt text because it was in French all the explanations in the Lisp are written in French too, so if you need more information use translator.

 

Leave a Reply