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!
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:
- Firstly we type in command line DIVIDE
- AutoCAD will ask us to select object to divide. Here we can select our Polyline/spline/line object.
- 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“.
- 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.
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:
- Firstly we type in command line MEASURE
- AutoCAD will ask us to select objects to measure. Here we can select our Polyline/spline/line object.
- 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”.
- 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.
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:
- We have to Download the Lisp from Here.
- We load the Lisp by typing Appload in command line and choosing it.
- 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.
- 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.
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.