Jump to content

Extract Coordinates along polyline.


therock005

Recommended Posts

Open the file containing those Light Wieght polylines. Then just for a minute create a new surface in your Prospector. Add all of those polylines to the surface as one giant group of breaklines. Then select that breakline group name in Prospector>>Rt Click and Select Properties, the Panorama will appear. Use CTRL+A to select all entries, Rt Click and select Copy to Clipboard. Paste into word or excel to groom the file of the breakline names, formatting, to turn it into a clean ascii file, user database file.

Link to comment
Share on other sites

  • Replies 27
  • Created
  • Last Reply

Top Posters In This Topic

  • rustysilo

    10

  • therock005

    7

  • SLW210

    4

  • chiefrenzo

    2

Top Posters In This Topic

Posted Images

  • 11 months later...
  • 3 years later...
  • 4 weeks later...

for the life of me i cannot find the "create points" box you show. Where is that located?

 

 

Found it. Expand the create points box (blue chevron on right side - circled in red) and under "prompt for descriptions" set it to None. Then initiate your command to create points on poly.

If you use SLW210's method you can just copy and paste the coords from the command window.

Link to comment
Share on other sites

for the life of me i cannot find the "create points" box you show. Where is that located?

 

That information was for Land Desktop and/or Civil 3D.

Link to comment
Share on other sites

ok, no wonder i couldn't find anything like that. I had to resort to extracting the data from a DXF file. I put the polyline in a separate file, then exported it to DXF. The DXF is an ascii file, fortunately not too hard to figure out where the coordinates are. For anyone who wants it, here is a program written in BASIC that will extract all the XYZ coordinates in every polyline in a DXF file, and write each polyline data into a separate file. This is written in PowerBasic, but is pretty representative of any Basic language.

 

#COMPILE EXE
#DIM ALL

FUNCTION PBMAIN () AS LONG

   LOCAL junk AS STRING
   LOCAL x,y,z AS SINGLE
   LOCAL filecount AS SINGLE

   filecount = 0

   LOCAL savename AS STRING

   savename = "c:\ljc\velocity"

   OPEN "c:ljc\velocityeltoro.dxf" FOR INPUT AS #1    'name of the DXF file with the polylines

   WHILE NOT EOF(#1)
       LINE INPUT #1, junk
       IF junk$ = "AcDb2dPolyline" THEN        'looking for the polyline tag inside the file
           filecount = filecount + 1
           OPEN savename + TRIM$(STR$(filecount)) + ".txt" FOR OUTPUT AS #2    'open a new output file for each polyline
           WHILE NOT EOF(#1)
               LINE INPUT #1, junk
               IF junk = "SEQEND" THEN      'if found the end of a polyline, close this file and look for the next
                   CLOSE #2
                   GOTO done_with_that_polyline
               END IF
               IF junk = "AcDb2dVertex" THEN         'found a vertex within the polyline
                   LINE INPUT #1, junk 'marker = 10 for x
                   LINE INPUT #1, junk 'read x
                   x = VAL(junk)
                   LINE INPUT #1, junk 'marker = 20
                   LINE INPUT #1, junk 'read y
                   y = VAL(junk)
                   LINE INPUT #1, junk 'marker = 30
                   LINE INPUT #1, junk 'read z
                   z = VAL(junk)
                   PRINT filecount,x,y,z
                   PRINT #2,filecount,CHR$(9),x,CHR$(9),y,CHR$(9),z     'write xyz to the file
               END IF
           WEND
       END IF
       done_with_that_polyline:      'go find the next polyline
   WEND
   CLOSE #1
   CLOSE #2

END FUNCTION

That information was for Land Desktop and/or Civil 3D.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...