AutoCAD Map 3D General Discussion

AutoCAD Map 3D General Discussion

Reply
*Expert Elite*
neilyj
Posts: 3,909
Registered: ‎08-01-2008
Message 1 of 18 (727 Views)
Accepted Solution

Bring csv file (with additional attributes) into Map

727 Views, 17 Replies
05-14-2012 12:47 AM

I found this post which describes exactly what I want to do to get data into Map http://map3d.wordpress.com/2008/01/02/bring-a-csv-file-into-map-3d-with-data/ but I get stuck almost at the first hurdle (see screenshot).

 

Isn't there any easier way to get this data into Map??

 

Thanks

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 500Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610

1. Get your pure data

1.Pure data.png

2. Insert the data to your favorite spreadsheet (in this description I use Microsoft Excel)

2.CSV data.png

3. Save your pure data to the CSV file called CSV (Comma delimited) but notice that you get a semicolon separator ( ; )

4.CSV file.png

4. Create a new Point File Format in Autodesk Civil 3D and call it e.g. PEN(semicolon) with settings:
- Default file extension .csv
- Comment Tag #
- Format options Delimited by ;

3.PEN semicolon.png

5. Import the points to Autodesk Civil 3D from your CSV file

5.Import CSV.png

6. Choose Output and Export Civil Object to SDF Set your coordinate system in this example Arbitrary X-Y Coordinates (XY-BC) is used

6.Points in C3D.png

7. Change the workspace to Autodesk Map 3D (Planning and Analysis)

8. Type a MAPWSPACE command and choose On

9. Connect to the SDF file

7.import SDF.png

10. Choose Points data from Civil_Schema and press Add to Map
11.
The Data Table is empty

8.Empty table.png

12. Export Layer Data to SQLite

9.Export SQLite.png

 

13. Open the Mozilla Firefox browser  
14. Install Extension called SQLite Manager from Mozilla Add-Ons
15.
From the Mozilla Firefox browser choose Web Developer and open SQLite Manager

10. sqlite manager.png

 

16. Open the SQLite Points base exported by Autodesk Map 3D

11. open sqlite.png

17. Open the table called Points, select Stucture and copy the statement (mentioned below) to the notepad for future reuse in next steps:

CREATE TABLE "Points" ("Autogenerated_SDF_ID" INTEGER PRIMARY KEY, "Geometry" BLOB, "Name" TEXT, "Description" TEXT, "RawDescription" TEXT, "Number" INTEGER, "Elevation" REAL, "Latitude" TEXT, "Longitude" TEXT)

12.copy statement.png

18. Select Points, choose Export Table and export the data to the CSV file Select the checkboxes: First row contains column names and Fields separated by Semicolon ( ; )

13. export table.png

19. Select the exported Points table and delete it

16.drop table.png

20. Open the exported Points table form the CSV file format in Microsoft Excel

14.open points csv.png

21. Change the column names and copy your data to these empty columns from the pure data CSV file

15. change data.png

22. Save the edited CSV file as the CSV format file

23. Go back to SQLite Manager and import the edited CSV file
- Select First row containing column names
- Select Fields separated by Semicolon ( ; )

17.import.png

 

24. Set types of data for all columns from the information that you have saved in the notepad:
Autogenerated_SDF_ID -> INTEGER
Geometry - > BLOB
Name - > TEXT
… etc.


18. set data type.png

25. Save and Close SQLite Manager

19.check data.png

26. Go Back to Autodesk Map 3D and connect to the re-edited SQLite database
27.
Select Points and Add to Map

20.import sqlite.png

28. Finally you will get your points from Civil 3D with data from the CSV table, other words you have just inserted all pure data

21. data from sqlite.png

If you check the result - geometry matches the description.

22.check.png

Valued Mentor
parkr4st
Posts: 460
Registered: ‎03-24-2004
Message 2 of 18 (719 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 02:12 AM in reply to: neilyj

search this forum for 64 bit odbc. 

New Member
jimyquick
Posts: 1
Registered: ‎06-29-2010
Message 3 of 18 (701 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 09:18 AM in reply to: neilyj
Distinguished Mentor
thepworth
Posts: 525
Registered: ‎03-02-2011
Message 4 of 18 (693 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 11:01 AM in reply to: neilyj

Neily,

 

Murph's post was for the 2008 version - more functionality (i.e. the survey tab under mapwspace) has been added, but you can still follow through & use ODBC to connect to Excel.  If using ODBC, you must use a named range in Excel and have the current 64bit excel driver.

 

If you're really stuck, send me a PM and I'll see what I can do to help walk you through it.

 

Todd Hepworth, P.E.


C3D 2011
Intel Xeon E5630@2.53Ghz
NVIDA Quadro NVS420 Dual Monitor
12GB Ram / Win7 Professional 64bit SP1
*Expert Elite*
neilyj
Posts: 3,909
Registered: ‎08-01-2008
Message 5 of 18 (688 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 12:52 PM in reply to: jimyquick

Gracias por esto voy a echarle un vistazo (from Google translate....)

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 500Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
*Expert Elite*
neilyj
Posts: 3,909
Registered: ‎08-01-2008
Message 6 of 18 (685 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 12:55 PM in reply to: thepworth

thepworth wrote:

Neily,

 

Murph's post was for the 2008 version - more functionality (i.e. the survey tab under mapwspace) has been added, but you can still follow through & use ODBC to connect to Excel.  If using ODBC, you must use a named range in Excel and have the current 64bit excel driver.

 

If you're really stuck, send me a PM and I'll see what I can do to help walk you through it.

 

Todd Hepworth, P.E.


Thanks Todd, I only have 32 bit Office so will need to look at the link in the post from jimyquick....

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 500Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
Distinguished Mentor
thepworth
Posts: 525
Registered: ‎03-02-2011
Message 7 of 18 (682 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 12:58 PM in reply to: neilyj

I also only have 32 bit office.

 

What I had to do was to uninstall office, install the 64-bit Access driver, reinstall 32-bit office over the 64-bit driver - you can't update the driver with 32-bit office on the machine.

 

Then use a named range in excel - this is critical.

 

Worked for me only after upgrading to 2012 - wouldn't work with C3D 2011 for ODBC to excel.

 

HTH!


C3D 2011
Intel Xeon E5630@2.53Ghz
NVIDA Quadro NVS420 Dual Monitor
12GB Ram / Win7 Professional 64bit SP1
*Expert Elite*
Murph
Posts: 2,052
Registered: ‎11-13-2006
Message 8 of 18 (677 Views)

Re: Bring csv file (with additional attributes) into Map

05-14-2012 02:59 PM in reply to: neilyj

neilyj wrote:

I found this post which describes exactly what I want to do to get data into Map http://map3d.wordpress.com/2008/01/02/bring-a-csv-file-into-map-3d-with-data/ but I get stuck almost at the first hurdle (see screenshot).

 

Isn't there any easier way to get this data into Map??

 

Thanks


Yes with the newer version (2010 and up) Use the Mapimport and select the ASCII format, You may need to edit the CVS file a bit but that's one way with out ODBC.

Murph
Supportting the troops daily.
*Expert Elite*
neilyj
Posts: 3,909
Registered: ‎08-01-2008
Message 9 of 18 (666 Views)

Re: Bring csv file (with additional attributes) into Map

05-15-2012 02:30 AM in reply to: Murph

Thanks for this but when I try the ASCII file, there doesn't seem to be an option to change the input fields....

neilyj
(No connection with Autodesk other than using the products in the real world)


IDSP Premium 2015 (mainly Civil 3D 2015 UKIE & Infraworks with some limited 3ds Max Design)
Win 7 Pro x64, 500Gb SSD, 1Tb HDD
32Gb Ram Intel Xeon CPU E5-2650 v2 @ 2.6GHz (32 CPUs), ~2.6GHz
NVIDIA Quadro K4000, Dual 27" Monitor, Dell T5610
*Expert Elite*
Murph
Posts: 2,052
Registered: ‎11-13-2006
Message 10 of 18 (655 Views)

Re: Bring csv file (with additional attributes) into Map

05-15-2012 05:14 AM in reply to: neilyj

Neilyj, If you have C3D why not just use the Civil3D opint import tools and create the format you need? Once you import the the cvs as points do a export to Geospatial of that point group to SDF format.

Can you attach a few lines of the CVS file?

Murph
Supportting the troops daily.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!