How to add points to an AutoCAD drawing, number them and export to CSV file
Introduction
We have recently been asked how to add points to a AutoCAD drawing, number them and then to export the coordinate points to a comma delimited file or CSV file.
Process
When adding point via the AutoCAD Home Tab, Draw Panel, they are simply placed and not named. So to enable you to do this you’ll need to create a Block and add a Attribute.
Firstly place the point anywhere using the Point tool.
If you battle to see the point, then set the Point Style by going to the Utilities Panel and setting the Point Style.
In this example I set the Points Style and also set the Size to Absolute 100 Units.
Now we can create the Block. Select the Create Icon in the Block Panel as shown. Then type in a name of the item, Pick a point on top of the point you placed earlier, and thirdly select the point object as a objects to include in the Block. Click OK.
The Block is now created but we need to edit it. Select Edit Block in the same “Block” Panel on the ribbon. Select the new block and click OK.
In the Block Editor select the Attribute Icon. Add a Tag, Prompt, Value and then set the Text Size as shown. Click OK and place the Attribute.
Close and Save the Block.
Now delete the existing point as this one does not have any attribute values. Then Insert these blocks, each time naming the object.
Now the Points have been placed and also named. Next is to export the points. Select the Table tool.Then on the left select the option: Data Extraction. Select Ok.
If you need to Save the drawing, do so and go through the steps. First Create a data extraction, naming the file : “points”, for instance. Then also click next at Page 2 of 8.
At page 3 unselect all and only leave the Block selected.
At page 4 only select the Attribute and X and Y positions.
At page 5 unselect both the Show count and name columns.
At page 6 select the Output data to external file and name the file. Also make sure you have selected the file format, setting it to CSV.
Then Click next and finish. The external csv file has been created and opening it you will see the info ass shown, listing the name and x,y cords of the points.
Conclusion
Using this method saves you a lot of time if you want to add point of interest in an existing environment and then naming these points and exporting them.
If you need any further training or have any question wrt the topic, please reach out to us at: https://www.mgfx.co.za/contact