Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manipulating Point Files

4 REPLIES 4
Reply
Message 1 of 5
dibr0804
335 Views, 4 Replies

Manipulating Point Files

Hi I kind of asked this before but it was in one of my unrelated threads.. How can I manipulate a point file (sta,offset,elev) to how I need it?

The point file comes in like this in a word doc or a .txt

000

                           -0.36           1276.41 
                           -0.00           1276.50 
                            0.33           1276.42 
005

                           -0.33           1276.42 
                           -0.00           1276.50 
                            0.19           1276.45 
010

                           -0.02           1276.50 
                           -0.00           1276.50 
                            0.04           1276.51 

____________________________________

I need it too looke like this:

000,-0.36,1276.41  
000,-0.00,1276.50  
000,0.33,1276.42 

005,-0.33,1276.42  
005,-0.00,1276.50  
005,0.19,1276.45 
etc...

I did the other ones by hand because they were only a few pages, but this one is about 500 pages I think.. before I had responses about parsing it but I tryed and I had no idea what I was doing or how to run it..

Thanks

4 REPLIES 4
Message 2 of 5
mathewkol
in reply to: dibr0804

It's very easy using MS Excel to get that into a comma separated file.  Getting the stations in front of all of the points will need to be done manually using copy paste or Auto-Fill dragging.  Unless someone has a better idea.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
Message 3 of 5
TerryDotson
in reply to: dibr0804

Thanks for your email, we added this tool to MapWorks.

 

The approach we took was to allow a field delimiter and in the case of spaces (like this one) allow the user to specify the order with instant visual feedback of the extents (see the attachment below).  Of course the coordinates will differ as we used a randomly generated alignment.

Message 4 of 5
dibr0804
in reply to: TerryDotson

Hi Terry, that program looks awesome and it looks like it would be easy to use and give good results

Message 5 of 5
Sinc
in reply to: dibr0804

Here's how to do it, using the same method as I used last time.  I took the Perl script I used the last time you asked a question like this, and modified it to work with this format.  I've attached a zip file that includes the Perl script, along with the output file it created.

 

If you've ever used regular expressions, Perl is pretty easy to use.  It's a lot like AWK, except you can also use variables and commands, to do even more elaborate things.  It basically lets you loop on an input file, using regular expressions to parse the input, then you can modify that data however you wish, and send it to an output file.

Sinc

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report