Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select Polylines

7 REPLIES 7
Reply
Message 1 of 8
gerrykroberts
413 Views, 7 Replies

Select Polylines

Dear All,

I have quite a lot of closed polylines which represent areas for calculating bill of quantities for a project.

 

I have made a vba routiune which calculates the area of each polyline and writes it to an excel spreadsheet.

 

Unfortunatelly if i select all the polylines i have the correct result BUT i don't know which area corresponds to which polyline.

 

I have find that the solution to my problem is to select one by one all the polylines but imagine since i have to count more than 10,000 polylines this is quite impossible.

 

Any ideas please will be highlly appreciated.......

 

Regards

Gerry

 

7 REPLIES 7
Message 2 of 8
drjohn
in reply to: gerrykroberts

Typically, entites are processed in the order they are picked.

 

Window picks (window or crossing window) are another story.

 

 

HTH

 

Regards,

DJ

 

Message 3 of 8

Hi,

 

what are you doing then with the Excel data and a list of area values (without any ID like parcel number or so)?

 

You might save the polyline's handle also to the Excel, so you have a connection between geometry and the record in your XLS, but what does that help?

 

And if it's a GIS-job to be done ... do you have Map3D (or Civil3D which contains the Map3D-funtionality)?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 4 of 8

Thanks a lot for your immediate responce.

 

iI must know the area of it's polyline in order to distinguish with the proper cross section of a breakwater, that's why i must know which is the area of the first polyline, the second, the third an so on...

 

Of coarse i have map and civil 3d. Does it help for my job ?

 

 

Message 5 of 8
dmfrazier
in reply to: gerrykroberts

"...i don't know which area corresponds to which polyline."

 

"...the solution to my problem is to select one by one all the polylines but imagine since i have to count more than 10,000 polylines this is quite impossible."

 

Even if you select one by one, still how would you know which area corresponds to which polyline?  Are the polylines identifiable (distinguishable) in some way other than their areas (or perimeter, or other property)?  It seems to me you have to grab some other distinctive "thing" about each polyline and store that info along with each area value.

Message 6 of 8

Hi,

 

>> Of coarse i have map and civil 3d

You can then export your polygons as SDF or SHP, then connect to that data using _MAPCONNECT, that gives you the ability to write the area-value (and maybe an ID) directly into the drawing.

You might also create a Map3D topology, that gives you a unique ID-value, that gives you also the area value and you can export ID + area-value into any ascii-exchange-format (to be imported into XLS if you need it). If you let the objects write it's label automatically (including the ID) you also have the option for visualising what ID belongs to what record in XLS.

 

At least the question from dmfrazier is really important, what does it help if you have a ID to the value in an XLS?

Do you then have any macro written in XLS that does anything with the AutoCAD objects? In that case I'm back with the handles 😉

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 7 of 8
gerrykroberts
in reply to: dmfrazier

All  the cross sections are adjacent to another and they have a unique number e.g. 1, 2, 3 and so on.

 

So as a result i have two columns in Excel. first is the section number and second the area number.

 

In case i select all the polylines with a croossing window for example the routine selects them in an unknown manner so the first column represents again the number of the section BUT the second one represents the area of a polyline which is not in the manner of the first column.

 

Regards

 

Message 8 of 8
dmfrazier
in reply to: gerrykroberts

"All the cross sections are adjacent to another and they have a unique number e.g. 1, 2, 3 and so on."

 

How is this unique number stored in the DWG?  Is it in any way connected to the polyline?  (Based on what you have said so far, I think the answer is "no".)  If not, is there any way you can envision to implement the numbering so that it is connected?

Perhaps polylines (alone) are not the best approach.  Understanding that it would likely require a certain amount of re-work, would it be feasible (possible and practical) to incorporate these polylines into blocks with fields and/or attributes?  (If the polylines are relatively simple - such as rectangles - the "blocks" might actually be one dynamic block.)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost