Thứ Tư, 20 tháng 8, 2008

Points from a text file

One of the tasks a Map user has to do is bring in points from a text file or a database. With the civil 3D tools in Map R2005 & 2006 you could use the civil points tools to do this but it required the point file to be in a certain format and we end up having to work on getting it to work correctly a few times when we don’t use it all the time. But thanks to a reminder from a poster on the AutoDesk discussion groups for reminding me of an old forgotten AutoCAD command, the “Multiple” command. What this command does is repeats a command that you provide in the command line until you press the escape button.
The thing you need too do is make sure the text file contains nothing but the coordinates for the points, if you have attributes or a point number mixed in with the coordinates you need to delete them from the file. So your text file is something like this:

1705145.103,829479.6554,0
1708780.203,825996.5793,0
1709520.941,823934.5335,0
1710569.845,824786.8715,0
1710583.068,824685.7594,0
1709493.485,828888.0862,0
1709298.454,831331.2523,0

Now with the file open select all the points and use ctrl+C to copy the lines to the windows clipboard. Back in your drawing give the MULTIPLE command, then the POINT command then paste the text from the clipboard by using ctrl+v when it asks “Specify a point”. The points should be created based on the text file. You then have to press the escape key to end the MULTIPLE command.

Command: multiple
Enter command name to repeat: point
Current point modes: PDMODE=35 PDSIZE=0.0000
Specify a point: “ctrl&v to paste the text file here”.

A simple way to add points, keep in mind your point mode settings so you can see the points but this is a quick way to bring simple points into your map.

viewmore

Không có nhận xét nào:

Đăng nhận xét