How to place text near line’s and polyline’s center with lengths of lines/polylines with Excel VBA Macro using NanoCAD Free/AutoCAD.

If you draw in DWG files lines/polylines which means are cables, electrical, water, gas networks or their segment, next Excel Macro will place to the right side of line/polyline their sizes in automate mode and saves into another file with "_Length_Text" suffix. Our Macro will define all coordinates for lines and polylines on your drawings.
To run our file with Macro use free version of NanoCAD or AutoCAD commercial software.


NanoCAD users:
1. Adjust settings for Microsoft VBA for NanoCAD
http://free-excel-vba.blogspot.com/2016/07/settings-vba-excel-nanocad-autocad.html
2. Download “Place_Line_Length_Text_DWG_NanoCAD.xlsm” Excel file with Macro.
3. Copy all DWG files to the same folder with Excel file. In these DWG files NanoCAD will find all lines and polylines are not in the blocks with “Polyline Color (Red, Green, Blue)”according to Data Table of “Place_Line_Length_Text_DWG_NanoCAD.xlsm” Excel file.
4. Press “ALT+F8” to run “Place_Line_Length_Text_DWG_NanoCAD” macro.
5. Macro will open NanoCAD application and place lines/polylines lengths near center points of them to the right side. Coordinates for all lines/polylines will are detected also, new DWG files with "_Length_Text" suffix will be saved.

AutoCAD users:
1. Adjust settings for Microsoft VBA for AutoCAD
http://free-excel-vba.blogspot.com/2016/07/settings-vba-excel-nanocad-autocad.html
2. Download “Place_Line_Length_Text_DWG_AutoCAD.xlsm” Excel file with Macro.
3. Copy all DWG files to the same folder with Excel file. In these DWG files AutoCAD will find all lines and polylines are not in the blocks with “Polyline Color (Red, Green, Blue)”according to Data Table of “Place_Line_Length_Text_DWG_AutoCAD.xlsm” Excel file.
4. Press “ALT+F8” to run “Place_Line_Length_Text_DWG_AutoCAD” macro.
5. Macro will open AutoCAD application and place lines/polylines lengths near center points of them to the right side. Coordinates for all lines/polylines will are detected also, new DWG files with "_Length_Text" suffix will be saved.

Known features and limitations:
a. Maximum DWG files – 1000.
b. Maximum lines/polylines segments quantity could be found - 10000.
c. Press “Select” button if you need to change color for the lines/polylines. Color codes – Red, Green, Blue, could be defined from your CAD application also.
d. “Number of decimal places” will adjust decimal places for lines/polylines length and coordinates. Must be more or equal to zero.
e. “Text Height” value must be more than zero. Please use “Number” format “Text Height” cell with decimal separator according to Excel/System settings.
https://support.office.com/en-us/article/Change-the-character-used-to-separate-thousands-or-decimals-c093b545-71cb-4903-b205-aebb9837bd1e

1 comment:

  1. Good work

    Please also visit my blog and give some guidelines for improvement.

    thanks

    https://excelsoftskills.blogspot.com/

    ReplyDelete

Please send your comments and suggestions: