CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 3165

CAD tip CAD tip # 11751:

Question CAD 
 %  platform  category 
Q - question

toMulti converts polylines to multi-lines driven by a definition table.

A - answer With the freeware utility toMulti you can convert selected polylines (LWpolyline) to multi-lines (group of polylines) according to a predefined definition table. The resulting line supports (unlike MLine) also line widths, arc segments, and start and end-blocks on the polyline - so it can handle more complex combinations. Alas, it is not associative and editable as an object - the conversion creates a group of individual lines.

The LISP application toMulti can be downloaded from Unpack the ZIP file (containing the .VLX and .TAB file) to an AutoCAD support path, load the application with APPLOAD and run it by typing the TOMULTI command.

The command prompts to select the polylines and the name of one of the definitions prescribed in the .TAB file (must be accessible in search path). Then it converts selected polylines to multi-lines.

The text file can be edited in Notepadu - its format contains the definition names (prefixed with an asterisk) and the respective segments with definitions of the offset (from the original line), color (code or name), line width, linetype and layer (since v1.2). Except for the offset, all parameters are optional. It can also contain names of the start and end-block on the polyline (prefixed with "#") - they must exist in the drawing. Since version you can also prescribe start and end caps (e.g. for hatching).

Since version 1.3 you can use layer names with spaces (must be enclosed in double quotes) and RGB color codes (a triplet in parentheses).

; *DefinitionName1
; offset[,color[,width[,linetype[,layer]]]]
; offset[,color[,width[,linetype[,layer]]]]
; [#startBlockName[,#endBlockName]]
; *DefinitionName2
; offset[,color[,width[,linetype[,layer]]]]
; offset[,color[,width[,linetype[,layer]]]]
; offset[,color[,width[,linetype[,layer]]]]
; S|E|B[,color[,width[,linetype[,layer]]]]
; [#startBlockName[,#endBlockName]]
; multi-word layer names as "My Layer", RGB colors as (R,G,B) values
-0.25,_ByLayer,0,Continuous,"Offset 2"

The variable DELOBJ controls deletion of the original (control) polyline.

When you set the LISP variable (setq _toMultiGroup T), the resulting lines will be grouped into an anonymous group (selected as one object).

100% *  CAD 
10.1.2018    7806×  

See also:
Tip 12863:Do you know the difference among the fonts ISOCP, ISOCP2 a ISOCP3?
Tip 12803:How to add double line-spacing to AutoCAD paragraphs?
Tip 12762:Multiline and vertical text in Fusion 360 sketches.
Tip 12755:How to create a polyline with multi-colored segments?
Tip 12456:How to EXTRUDE with a twisted profile in AutoCAD?

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 More info

Please use these tips at your own risk.
CAD Studio is not responsible for possible problems that may occur as a result of using any of these tips.