SCRIPT not plotting my survey points from Notepad..

SCRIPT not plotting my survey points from Notepad..

PS78
Participant Participant
2,377 Views
16 Replies
Message 1 of 17

SCRIPT not plotting my survey points from Notepad..

PS78
Participant
Participant

Hi, I'm trying to plot survey data in AtoCAD2024, firstly on a plain dwg then onto an existing topo dwg. Using link:
How to import survey data from a spreadsheet (XLS, CSV...) into AutoCAD (autodesk.com)
My points (name, east, north) are comma separated in Notepad, with header replaced with _MULTIPLE _POINT, units & angle sorted in autocad, then type SCRIPT, with result:

Command: SCRIPT

.....select file in pop up window, enter.....

Command: _MULTIPLE
Enter command name to repeat: _POINT
Current point modes: PDMODE=0 PDSIZE=0.0000
Specify a point: hdt1.................................................(this is first part of the name of first point)
Invalid point.

..and no plot! Please explain/help

0 Likes
2,378 Views
16 Replies
Replies (16)
Message 2 of 17

Patchy
Mentor
Mentor

Only x,y,z coordinates can be imported, no descriptions allowed.

Use Civil 3d to do what you want.

Message 3 of 17

TheCADnoob
Mentor
Mentor

if you look ath the example script file, i dont see where they used the names. it looks like its just the X,Y values

 

TheCADnoob_0-1682687338256.png

 

CADnoob

EESignature

Message 4 of 17

pendean
Community Legend
Community Legend
Share your files here please.
Message 5 of 17

charmingladyfool
Contributor
Contributor

Hi Peter.

in Autocad script file u need to write data in same way as we write commands on autocad command prompt.

For example we need to draw a point. Here we will enter command POINT. Then we will enter 2D or 3D point 12,23,56 (in format x,y,z)

Command: POINT

Specify a point: 12,23,56

I am attaching contents of sample script file. Download this file. Rename the extension txt to scr (like MySCR.scr). Run SCR command in Autocad and select MySCR.scr.

Good luck

Message 6 of 17

PS78
Participant
Participant

Hi Patchy, thanks for your message.

I'm curious: if the points cant be annotated, how does the viewer know what each point [plotted] is?

0 Likes
Message 7 of 17

pendean
Community Legend
Community Legend

pendean_0-1682688598855.png

 

0 Likes
Message 8 of 17

PS78
Participant
Participant

Hi cadNOOB, thanks for your message. 

I noticed that too, but i wonder, if the points cant be annotated, how does the viewer know what each point [plotted] is?

0 Likes
Message 9 of 17

Patchy
Mentor
Mentor

It is misleading from Autodesk link that you have.

Very useless with only points plotted.

 

 

Message 10 of 17

PS78
Participant
Participant

Hi

0 Likes
Message 11 of 17

PS78
Participant
Participant

thanks for your message. I ran the SCR file and got the result:

0 Likes
Message 12 of 17

PS78
Participant
Participant

3d civils?..... 😞 
...i'm stuffed then!
Seems crazy, to have to get an extra specialised AC product just to plot survey coord points ...on a 2d topo drawing.

0 Likes
Message 13 of 17

PS78
Participant
Participant

😑Autocad seems so backwards; that it can't take point data being copy-pasted / dragged / 1 click imported onto a topo 2d/3d. It's too complicated for it's own mainstream use.... And the help topics/sources are useless. Can anyone recommend more user-friendly Programs please, while i contemplate an AC subscription?
TKU

 

0 Likes
Message 14 of 17

Patchy
Mentor
Mentor

Are you sure the coordinates on your drawing is correct?

Huge error with the decimal places.

p2.JPGp1.JPG

0 Likes
Message 15 of 17

ChicagoLooper
Mentor
Mentor

@PS78 

<<....so backwards; that it can't take point data being copy-pasted....>>

 

Whoa........no, no, that’s not true. It's not backwards. You just gotta understand how the program works and how to use it to insert your survey data.

Using AutoCAD to display a survey doesn't simply entail inserting points, it begins by understanding the data and ends with a graphic presentation of how the survey relates to other objects in the real world.

 

Based on the txt and dwg you've uploaded, here are some observations:

  1. Your txt file, like all survey data, are points and each individual point represents 'a position' on earth. The positions can be expressed as x,y coordinates. Sometimes those coordinates are accompanied by an elevation which is expressed as a z-value. All coordinates are relative to a specific northing/easting grid (the are hundreds of grids) covering planet earth. There are big global grids and small regional grids. Your txt file appears to be referenced against OSGB 1936 National Grid (Ordinance Survey Great Britain, 1936, meters) also known as EPSG 27700. As you probably know, it covers Great Britain. It won't cover other countries like Australia, South Africa, or Canada. If you don't consider the grid your data is referenced against, your drawing, and all the hard you've put into it, may not harmonize with current and future team members. 
  2. The linework in your dwg isn't scaled correctly. They're too far away from where they should be. As it turns out, your modelspace entities have x- and y-values exactly 1000 times greater than they should be. To fix it, the entire drawing (all drawn objects) must be scaled by a factor of 0.001 (using 0,0 as the basepoint, of course). If you don't scale all the objects by the same factor using the same basepoint, then your map won't fall on the OSGB grid and you'll be left with the objects hanging in some far, far away place, nowhere near the water treatment plant and solar farms in Ferndown. 
  3. Inserting a point with a label using a script isn't a good choice because AutoCAD's point command doesn't provide an opportunity to add a label. To be brutally honest, if labels must be linked to objects, then the point command must be abandoned.
  4. You have limited options for labels: (a) insert the points individually by inputting coordinate pair-by-coordinate pair....this is your best bet if you want to stay in vanilla Cad b/c it dumbs-down any data, (b) learn coding to write a customized insertion procedure that utilizes your specific coordinate system and can understand the text used in your point descriptions to insert objects with labels, (c) discover another plainvanillaAutoCADcommandthatforumusersneverheardof to insert your points, or (d) use another AutoCAD vertical such as Map3D or Civil3D both of which have commands and procedures specifically developed to understand coordinate geometry so it can accurately insert survey data with (1) a description, (2) an elevation, (3) a point ID number, or any combination of the aforementioned.

1. Water treatment plant and adjacent solar farms.1. Water treatment plant and adjacent solar farms.

 

2. Closeup with survey points in red circles and labels in green.2. Closeup with survey points in red circles and labels in green.

 

3. Yes, survey work involves data.......and data requires a specialized toolset.3. Yes, survey work involves data.......and data requires a specialized toolset.

 

 

 

Chicagolooper

EESignature

Message 16 of 17

Wojty1
Advocate
Advocate

For Vanilla AutoCAD you could try one of those LISP routines (my favorites in order of appearance) that insert a point block with description attributes:

  1. ASCPOINT -> https://www.cadforum.cz/en/import-a-xyz-coordinate-file-as-autocad-points-with-labels-tip8496 
  2. ImportXYZ -> https://www.jefferypsanders.com/autolisp_IMPORTXYZ.html 
  3. POINTSIN -> http://www.hawsedc.com/gnu/pointsin.php 

Hope this helps

Windows 10 Pro 64-bit | Civil 3D 2024 / Revit 2024 (64-bit EN)
Intel Core i7-7700K / 2x 24" / 64 GB RAM / GeForce RTX 3060 OC V2

Windows 11 Pro 64-bit | All Autodesk Products 2023 - 2025
Intel Core i7-13850HX / 3x 24" / 128 GB RAM / nVidia RTX Ada 3500
0 Likes
Message 17 of 17

crashcup99
Participant
Participant

Run the script from inside AutoCAD to test it.

If you cannot get a successful run of your script then find and fix the problem and run it again.  

0 Likes