Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting COGO Points from blocks with descriptions

50 REPLIES 50
SOLVED
Reply
Message 1 of 51
carl3ZPF6
1533 Views, 50 Replies

Extracting COGO Points from blocks with descriptions

I have an issue where a have a massive drawing with 1000+ different blocks. Each block has an autocad point within it (which is also at the same position as the block insertion point). What I want to do is convert all the autocad points to COGO points. What I have been doing is exploding all blocks then converting the Autocad point to COGO points. This is an issue because any block information is lost. What I want to get as an output is all the COGO points but with a description of each point that is tied to the block it came from.

 

What I have tried is changing the autocad point to a COGO point at the block level (and adding the appropriate block description). The issue is when I go back to the drawing to try to explode these blocks, I get a duplicate point number error (I tried every option for re-sequencing but it seems the "apply to all points" check box is broken and I have to choose options for every single point [1000+]).

 

Is there a better way to do this? I know a little LISP so I am not opposed to a scripted solution.

 

Any help is appreciated.

Labels (1)
50 REPLIES 50
Message 21 of 51
carl3ZPF6
in reply to: Pointdump

It just seems weird that I am exporting from C3D, and the output file cannot be directly input back in.

Message 22 of 51
Pointdump
in reply to: carl3ZPF6

Carl,
"It just seems weird that I am exporting from C3D, and the output file cannot be directly input back in."
It's always been that way. Just re-save it in any format without a BOM. I usually take the text file into Excel and re-save as CSV.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 23 of 51
ChicagoLooper
in reply to: carl3ZPF6

Hi @carl3ZPF6 

If you only need X, Y and Z values, here's an easy step-by-step workflow with pictures. The procedure involves exporting your blocks to a shapefile. Some users will consider this method out-of-the-box because they don't have experience with it. The workflow demonstrates how you can leverage the power of the program to easily make a csv file to insert your cogo points.

 

Enter MAPEXPORT on command line then follow the steps below to export to shapefile format.

 

1. Name and save your shapefile. You may save it in your project folder.

Image-1Image-1

 

2. On the Selection tab, export POINTS. You can select the points manually using a crossing window.

Image-2Image-2

 

3. On the Data tab, select the attributes as shown. 

Image-3Image-3

 

4. On the Options tab, click OK to complete the shapefile export procedure. 

Image-4Image-4

 

5. Go to your project folder. From Windows Explorer, drag the new shapefile from its folder and drop is directly onto modelspace. Before dropping it, though, pause for 5 seconds so AutoCAD has the time to READ the shapefile. Slow and easy, you don't need to be fast. If your shapefile contains a lot of points and is super big, you'll need to pause longer or choose another method to add your points, e.g. use a Feature Data Object connection (FDO).

Image-5Image-5

<<You may use MAPWSPACE=>ON to open the Map Task Pane . If you want to use an FDO connection, use MAPCONNECT to open the Data Connect Palette.>>

 

6.Open the shapefile's Table (see image-5). The columns below are consistent with the selections made earlier. Refer to image #3. (FeatId is automatically generated whenever creating shapefiles). At the bottom of the Table, go to Options=Select All=>Options=>Export. Name and save the exported Table to csv format.

Image-6Image-6

<<All rows and columns in the Table will be highlighted blue after you Select All.>>

 

7. Open the exported Table using Excel. The exported Table is shown on the left. You'll need use your fantastic editing skills so AutoCAD can understand it. You can edit the Table so it looks like the one on the right. Row #1 is optional but was inserted anyway for organizational purposes. It contains the column headers and they must be preceded with the '#' symbol so the cell contents are treated as COMMENTS and not as DATA.

Image-7Image-7

8. Finally, save the edited csv file. You may add '_PNEDZ' to the end of the file name when saving it so you don't forget the csv format. When you save it, be sure to select the right csv extension, AutoCAD doesn't like all csv formats when using a point file to insert cogo points.

Image-8Image-8

 

NOTES:

  • You can use the newly created csv file to insert your cogo points.
  • If you followed the steps, the cogo descriptions will be the same as your original block name.
  • Your original blocks didn't have elevation values so all your blocks will sit at sea level.
  • If you need more than easting, northing and elevation to be included in you cogos, you'll need to reformat your csv file and that might also involve creating a new shapefile.
  • Aside from using a crossing window in step #2, practically no activity was performed in modelspace. This procedure relies on you leveraging the existing data in the drawing file as opposed to letting the info just sit there doing nothing.
Chicagolooper
Message 24 of 51
cwitzel5NL5H
in reply to: Pointdump

I have always saved CSV as the second option in the Excel export option with no issues:

cwitzel5NL5H_0-1694183079922.png

If this is a common task I think a Dynamo could do it pretty easily as well.  Without the extraction, Excel, CSV Import.  Probably too much time for what you are after, but it would be an option.

Conan Witzel
Herrera Inc
Message 25 of 51
carl3ZPF6
in reply to: cwitzel5NL5H

This is something I do pretty regularly, can you expand on how to use Dynamo for this?

Message 26 of 51
cwitzel5NL5H
in reply to: carl3ZPF6

Hmm, probably too much for a Forum post.  I would suggest just diving in.  It is pretty easy to get started and this seems like a pretty simple task.

You can start here:  https://dynamobim.org/

I have attached a dynamo that changes some block properties that might help you get started.  Depending on your Dynamo/Civil3d version you may need to download some packages. (I should have called it randomize vs scatter)

It has it's own special annoyances for sure, but is very powerful.

Conan Witzel
Herrera Inc
Message 27 of 51
Joe-Bouza
in reply to: carl3ZPF6

😎👍Wow you guys were having fun 

Joe Bouza
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

Message 28 of 51
ChicagoLooper
in reply to: carl3ZPF6

@carl3ZPF6 

 

Using AutoCAD Civil3D=>export to shapefile=>copy to clipboard=>Paste to Excel in csv format. 

 

201.PNG

 

Chicagolooper
Message 29 of 51
Pointdump
in reply to: carl3ZPF6

Hi Carl,
@cwitzel5NL5H 's suggestion to use Dynamo got me to nosing around the >>>Dynamo for Civil 3D Forum<<<.
I snaked, and then modified, the Dynamo Graph I found >>>Here<<<.
Attached, please find BlockName2RawDesc.dyn. Try it out.
Dave

 

BlockName2RawDesc.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 30 of 51
carl3ZPF6
in reply to: Pointdump

I cannot seem to get this to run, seems there is a broken link when I look at the code, do I need any libraries for this?

carl3ZPF6_0-1694464526504.png

 

Message 31 of 51
carl3ZPF6
in reply to: carl3ZPF6

Never mind it was a C3D toolkit I needed to update

Message 32 of 51
Pointdump
in reply to: carl3ZPF6

Carl,
Glad you got it working. Like magic, huh?
I've got ArkanceSystems, Civil3DToolkit, and Camber libraries.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 33 of 51
carl3ZPF6
in reply to: Pointdump

@PointdumpThis script is almost perfect, but it inserts some garbage points as well? As you can see below there are 613 points exported when there should only be 560. the rest of the points inserted southwest of the main drawing in two columns

carl3ZPF6_0-1694466058032.png

 

Message 34 of 51
carl3ZPF6
in reply to: carl3ZPF6

@PointdumpAll of the garbage points seem to have negative easting

Message 35 of 51
Pointdump
in reply to: carl3ZPF6

I see them now. I have no idea what happened.
Dave

 

ErrantPts_1.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 36 of 51
Pointdump
in reply to: carl3ZPF6

Wierd! But at least the garbage points are clearly identifiable. 613-53=560
Dave

 

ErrantPts_2.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 37 of 51
carl3ZPF6
in reply to: carl3ZPF6

Yes but I cannot know that that will always be the case these block arrays can be massive

Message 38 of 51
carl3ZPF6
in reply to: carl3ZPF6

@Pointdump  For example in this file I just copied the base pattern, and it is big enough that the actual points are now indistinguishable from the garbage points.

Message 39 of 51
Pointdump
in reply to: carl3ZPF6

Looks like it needs some error checking. I'll try to figure out where the wheels came off.
Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024
Message 40 of 51
Pointdump
in reply to: carl3ZPF6

Carl,
I discovered something. If you WBLOCK out the 560 blocks to a new drawing, then the Dynamo graph works as expected. No garbage points.
Dave

 

BlockName2Desc_2.png

 

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2024

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report