How do I "export" multiple closed polyline and modify CSV and "import" it back into civil 3d?

How do I "export" multiple closed polyline and modify CSV and "import" it back into civil 3d?

jeff.wangD95HG
Collaborator Collaborator
2,054 Views
35 Replies
Message 1 of 36

How do I "export" multiple closed polyline and modify CSV and "import" it back into civil 3d?

jeff.wangD95HG
Collaborator
Collaborator

So I have a bunch of closed polyline and I am wondering if I could export it into CSV with coordinates on each vertices. Then I want to change the coordinates of the vertices in CSV and import it back into civil ?

How do I go about doing this?

I know you can extract data with dataextraction command but I am not sure how I can import it back into civil and maintain the polyline.

0 Likes
2,055 Views
35 Replies
Replies (35)
Message 2 of 36

Pointdump
Consultant
Consultant

Hi Jeff,
I don't think Data Extraction will give you vertices of a 2D Polyline. (I might be wrong.) Why do you want to change the vertices? Feature Line editing is probably the easiest way to do that.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 3 of 36

jeff.wangD95HG
Collaborator
Collaborator

data extraction is probably not the route to go then

 

I need to convert a bunch of polylines that are drawn with 3 decimal accuracy into polylines with 2 decimal accuracy and closes.

 

labeling it with 2 decimal accuracy doesn't work because of rounding error causing it to not close and I will need to calculate the area which will also be slightly off due to rounding error.

0 Likes
Message 4 of 36

AllenJessup
Mentor
Mentor

You'd have to explode the PLs then use Dataextraction selecting the Start X, Y and Z. Then edit the file and make it a script to create new polylines.

You could also list the polyline and copy the coordinates from the Text Screen (TEXTSCR).

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 5 of 36

jeff.wangD95HG
Collaborator
Collaborator

So let me get this straight

1.explode all the poly lines into lines

2. use data extraction and extract start x,y and end x,y into csv

3. modify csv

4. feed it to a script (to be worked on)

5. modified lines are back into civil

 

 

0 Likes
Message 6 of 36

ChicagoLooper
Mentor
Mentor

@jeff.wangD95HG 

Sorry, but I think you're oversimplifying it. When doing it the csv way, you may or may not, be successful moving the vertices, but it doesn't consider the final geometric shape and how the coordinates of the vertices will change. 

 

Here's an example (refer to diagram below):

RED rectangle 0.146 x 0.114 (Width x Height) = Actual dimensions with 3 decimals.

GREEN rectangle 0.15 x 0.11 (W x H) = Dimensions after rounding to 2 decimals.

101.PNG

 

How do the red and green rectangles relate to one another? Given the new dimension after rounding, you may, if you wish, position the rectangles far enough away so their vertices don't overlap. (I don't think you'd do that, but you could if you wanted to.)

 

Given the circumstances, there's a maximum of one vertex (coordinates) that can be shared between the two rectangles. In this example you can't have more than two vertices overlapping after rounding--it's mathematically impossible.

     

So the million dollar question is, How do you move the resultant geometry once the new vertices are computed?' And that's still under the assumption (huge assumption) the vertices can be moved in a logical, consistent and rational way. 

 

If you overlap the centroids, is it OK when no vertices overlap?

If you overlap one vertex, how do you choose which one?

What if it's not a rectangle but an octagon, which vertex will you choose?

If you have a cluster of polygons, will some overlap after rounding due to an increase in area? Will some fail to overlap due to a decrease in area?

 

 

  

 

Chicagolooper

EESignature

0 Likes
Message 7 of 36

Neilw_05
Mentor
Mentor

Why not explode them, then rejoin with units set to 2 decimals? You can apply a tolerance of .01 when you join them. Or should the tolerance be .00? Run some tests. Afterward set the closed parameter to "Yes" for all of them.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
0 Likes
Message 8 of 36

rl_jackson
Mentor
Mentor

To import export and reimport to redraw them would be to use the Survey Database with cogo points. Then you can draw anything based on the coordinates (old or new). They won't be polylines and will react like featurelines (elevation aware).  Then there's always the old school Survey Command line method (haven't used it in a while myself, but doable.)

 

 


Rick Jackson
Survey CAD Technician VI

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 9 of 36

TerryDotson
Mentor
Mentor

labeling it with 2 decimal accuracy doesn't work because of rounding error causing it to not close and I will need to calculate the area which will also be slightly off due to rounding error.

IMO, you should keep all the precision you can in the source geometry. When you label a boundary with bearings (to the second) and distances (to two places) very few would expect that re-traversing those labels would close 1/Infinity.  If you reprocessed every legal description you could find, chances are none would close to infinity.  However, closure ratios of 1/100,000+ (check local requirements) are considered acceptable and there can always be a tiny variance in the area calculated. 

 

In summary it's an understood circumstance and changing the decimals of the source coordinates is not a good idea, again only my opinion.

Message 10 of 36

AllenJessup
Mentor
Mentor

@jeff.wangD95HG wrote:

So let me get this straight

 


 That's the only way I can think of. Plus you would have to extract one PL at a time and add that to the script file to avoid mixing coordinates between polylines. It should look like this.

_3dpoly
9483.8070,9606.8060,0.0000
9079.7944,9624.4844,0.0000
8579.7409,9739.7847,0.0000
8318.1030,10048.1120,0.0000
7960.5508,10120.9918,0.0000
7737.1592,10227.8891,0.0000

_3dpoly
7957.9924,10455.7706,0.0000
8289.7703,10645.4074,0.0000
7541.8121,10236.5455,0.0000
8211.3569,9550.8304,0.0000
8394.8383,10239.7044,0.0000

 

I'm still not sure what you're trying to do. It looks like you're saying the polylines aren't closing because the dimensions are too accurate. Usually less accuracy leads to more misclosure.

Can you post an example?

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 11 of 36

jeff.wangD95HG
Collaborator
Collaborator

thanks for the help everyone.

 

This is a procedure that I am doing for a strata plan. I've never done a strata plan before prior to this but based on the feed backs I am getting from my superior I am revaluating and reverse engineering the proper/efficient to get this done efficiently. 

 

 

step 1 draw the centerline of wall from arch plan 

step 2 label them to 2 decimal place

jeffwangD95HG_0-1689090260922.png

as you can see from the drawing above, if I just label them as 2 decimal place and leave them then the top and bottom wouldn't close. 

Also I have been instructed that the labelling are what should be held as "correct" in the plan. In other words, labelling should close and area would be derived from those labeling so anyone without access to the cad file or arch plan can derive the same results.

 

some additional rules is pretty much all the line work are orthogonal

 

so what I am thinking is to get a list of all the vertices and aggregate them together if their x or y values are within 0.01 to ensure orthogonal are kept and closes after rounding?

 

so X: 1.000 and Y : 2.001 and another point at 3.000 and Y:2.006 would become

X 1.00 and Y 2.00 , X 3.00 Y 2.00

instead of

X 1.00 and Y 2.00 , X 3.00 Y 2.01

which would not close and would not be orthogonal

 

 

 

0 Likes
Message 12 of 36

AllenJessup
Mentor
Mentor

Are you using Civil Label Styles or AutoCAD Dimmstyles?

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 13 of 36

jeff.wangD95HG
Collaborator
Collaborator

civil 3d label style

but label style is not the issue. I still need to label area base on line work  that has been converted to 2 decimal place and closes

0 Likes
Message 14 of 36

AllenJessup
Mentor
Mentor

In that case. I don't see any option other than trying the coordinate export or redrawing them with the correct distances.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 15 of 36

Neilw_05
Mentor
Mentor

Could we use the Mapclean tool to close the polylines? I am thinking to leave the polylines intact and use the snap clustered nodes option with a very small tolerance. It should adjust any mismatched ends to close. Maybe I don't understand the problem.

Neil Wilson (a.k.a. neilw)
AEC Collection/C3D 2024, LDT 2004, Power Civil v8i SS1
WIN 10 64 PRO

http://www.sec-landmgt.com
Message 16 of 36

jeff.wangD95HG
Collaborator
Collaborator

no that doesn't work.

basically you need to label the line work to 2 decimal place and print out a pdf.

Then delete all your cad drawing and arch plan (we don't actually do this but in concept we won't be using them any more)

 

Redraw the whole drawing based on the labels on the pdf with 2 rules in mind

1. the drawing must close

2. the lines must be orthogonal

 

and yes that does seem to have unnecessary work that can be optimized

0 Likes
Message 17 of 36

ChicagoLooper
Mentor
Mentor

Hi @jeff.wangD95HG 

<<...I've never done a strata plan before prior to this but based on the feed backs I am getting from my superior I am revaluating and reverse engineering ....>>

 

Australia boundaries? Based on your explanation and your use of strata plan, are you drawing boundaries for Australian properties, as in condominium ownership?

 

If you are, you are trying to redraw 'closed' polygons such as a bunch of condo boundaries because you want 2-decimals in their dimensions as opposed to 3-decimal precision. That's strange. Those boundaries represent legal ownership so lengthening or shortening segments of a boundary based on rounding might make messy corners where adjacent boundaries lie and where an individual unit abuts a common area. 

 

You should clarify with your boss before proceeding. All you may need is a change in 'precision' of you dim style from 3 decimal places to only 2. 

 

Just so there's no misunderstanding, can you confirm whether you are drawing property boundaries?

 

  

Chicagolooper

EESignature

0 Likes
Message 18 of 36

jeff.wangD95HG
Collaborator
Collaborator

not drawing property boundary.

Drawing house floor plans base on arch plan as part of the procedures for a canada strata plan

 

why am I getting the feeling that I am not suppose to draw floor plans using civil 3d and there is a better program out there for this kind of task

0 Likes
Message 19 of 36

AllenJessup
Mentor
Mentor

@jeff.wangD95HG wrote:

why am I getting the feeling that I am not suppose to draw floor plans using civil 3d and there is a better program out there for this kind of task


I've never had any issues. The question is why are the length of the line segments different that what needs to be used.  6.015' isn't equal to any common architectural dimension I can think of. It's kinda close to an eighth of an inch, 0.010416'. but not quite.

Using the common AutoCAD commands to draw the outlines of floor plans is common. For full Architectural plan. I'd look at Revit.

Allen Jessup
CAD Manager - Designer
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 20 of 36

jeff.wangD95HG
Collaborator
Collaborator

"6.015' isn't equal to any common architectural dimension"

I free hand drew that for demonstration

also I am not sure why isn't anyone else having the same issue. I wasn't even aware of this issue at all before I started drafting strata plans. Concepts of converting high precision line work into lower precision measurements and forcing it to close baffles me.

0 Likes