AutoCAD Map 3D General Discussion

Reply
Valued Contributor
scott_hicks
Posts: 60
Registered: ‎11-12-2003
Message 1 of 4 (1,743 Views)

Exporting polyline nodes?

1743 Views, 3 Replies
03-15-2004 09:35 AM
Is it possible to extract the coordinates (x, y, z) of polyline nodes to
an ascii file?

Thanks,
Scott
mra
Member
mra
Posts: 3
Registered: ‎01-09-2004
Message 2 of 4 (1,743 Views)

Re: Exporting polyline nodes?

11-01-2006 02:19 PM in reply to: scott_hicks
Here is the work arround I got:

Open the dwg file
Export the polylines to a GML file using the MAPEXPORT command
Open the GML file in EXCEL as an XML list, This might generate an error - let Excel fix it by selecting yes.
Delete the unneeded columns in Excel keeping the coordinate string for each polyline (my column is ns2:coordinates8)
Select the column and change the format to General (to get rid of the #########)
Export this as a TXT file and you can do pretty much what ever you need to with it.

I added some object data to the export that was my GIS_ID and I was set.
*John Cutler
Message 3 of 4 (1,743 Views)

Re: Exporting polyline nodes?

11-05-2006 08:58 AM in reply to: scott_hicks
I use a LISP routine called "ptexport" that directly exports polyline nodes
to a comma-delimited text file. The LISP routine came from
http://www.dotsoft.com; click on "Free Stuff" on their home page. The text
file contains x,y,z coordinates.

What the export does NOT provide is any point ID. The export list starts
with the first point of the polyline and proceeds to the end, so you can
number the points (e.g., on a printed list or in Excel), count them on the
polyline and label them manually.

John Cutler
Mapping/GIS Director
Ozark Regional Land Trust
jcutler@getgoin.net


wrote in message news:5382065@discussion.autodesk.com...
Here is the work arround I got:

Open the dwg file
Export the polylines to a GML file using the MAPEXPORT command
Open the GML file in EXCEL as an XML list, This might generate an error -
let Excel fix it by selecting yes.
Delete the unneeded columns in Excel keeping the coordinate string for each
polyline (my column is ns2:coordinates8)
Select the column and change the format to General (to get rid of the
#########)
Export this as a TXT file and you can do pretty much what ever you need to
with it.

I added some object data to the export that was my GIS_ID and I was set.
Valued Contributor
jcutler
Posts: 58
Registered: ‎02-17-2006
Message 4 of 4 (1,743 Views)

Re: Exporting polyline nodes?

11-05-2006 09:09 AM in reply to: scott_hicks
Something to be aware of when exporting polyline nodes: nodes can sometimes inadvertently get "stacked" -- that is, multiple node points with the same coordinates.

When the nodes are exported, there will be duplicate values in the text file. This will throw off hand numbering on the drawn polyline (because the "stacking" is not visible on the drawing).

Use the command line MAPCLEAN or Express tools > Modify > Delete duplicate objects to get rid of these "stacks" and then "ptexport" again. Sometimes I have to run both these cleanup routines more than once to "fully clean" a polyline. Not sure why that is.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community