Code Red > VB(A)

Length Calculation from Autocad to Excel

(1/3) > >>

orcan:
Hey all,

Through my searches on internet i found the swamp with many helpful articles and members.
First of all i did not want to open a new thread but i could not find an exact solution for my problem.
Basically i need to open dwg files inside a folder and calculate each drawings total length then write it down to excel.
it should look like something below,
dwg1=1200 mm
dwg2=700 mm
and so on.
drawings may contains polylines or multilines.

Thanks in advance.

orcan:
i am sure answers is hiding somewhere.

MexicanCustard:
Total length of what?  What's in these drawings that needs the length calculated?

Do you need the solution in VBA?  Do you write VBA and if so, post what you've tried in an attempt to solve this?

orcan:
that should be done by excel vba

i did not write my own codes just tried some other users codes,

they do not fit what i wanted and seems very complicated to be redesigned by my self

process is like that

a certain folder will be choosed in excel than all dwg files  adresses will be obtained by excel

than excel will make the autocad open those files and calculate the total length of the lines

finally autocad will publish those files on excel.

The goal of the project is to calculate total length of those parts to be cut by plasma cutter.

hope i could explain better

RICVBA:
I attach an excel file with VBA code I quickly derived from one of mine to try and match your needs
It references AutoCAD 2010 type libraries
If you have a different AutoCAD version you have to update the references via Tools-> References tab in the VBA IDE and selecting the proper reference (something like "AutoCAD 20xx Type Library")

and pray it works!

bye

Navigation

[0] Message Index

[#] Next page

Go to full version