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.
Solved! Go to Solution.
Solved by Pointdump. Go to Solution.
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
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.
2. On the Selection tab, export POINTS. You can select the points manually using a crossing window.
3. On the Data tab, select the attributes as shown.
4. On the Options tab, click OK to complete the shapefile export procedure.
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).
<<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.
<<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.
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.
NOTES:
I have always saved CSV as the second option in the Excel export option with no issues:
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.
This is something I do pretty regularly, can you expand on how to use Dynamo for this?
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.
😎👍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.
Using AutoCAD Civil3D=>export to shapefile=>copy to clipboard=>Paste to Excel in csv format.
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
Dave Stoll
Las Vegas, Nevada
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?
Carl,
Glad you got it working. Like magic, huh?
I've got ArkanceSystems, Civil3DToolkit, and Camber libraries.
Dave
Dave Stoll
Las Vegas, Nevada
@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
I see them now. I have no idea what happened.
Dave
Dave Stoll
Las Vegas, Nevada
Wierd! But at least the garbage points are clearly identifiable. 613-53=560
Dave
Dave Stoll
Las Vegas, Nevada
@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.
Looks like it needs some error checking. I'll try to figure out where the wheels came off.
Dave
Dave Stoll
Las Vegas, Nevada
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
Dave Stoll
Las Vegas, Nevada