Points imported using a script are missing

Points imported using a script are missing

nara7ZXKX
Enthusiast Enthusiast
1,157 Views
6 Replies
Message 1 of 7

Points imported using a script are missing

nara7ZXKX
Enthusiast
Enthusiast
Hello all and thanks for any insight in advance,

I am working in AutoCAD24 and do not have access to Civil3D.

I have adapted a script I found here to import points with their elevations and descriptions.

I actually posted here awhile ago asking about adjusting points, and didn’t get the answer I needed yet, but you can read about the toys I’m testing. Some features have been removed or rearranged on my property so I’ve thinned the Excel file to only the hardscaping that still exists so I can compare common points measured previously with a total station to those taken currently with a Moasure ONE and Disto S910.
Because the Moasure and Disto both start all their files on 0,0,0 after swapping northings and eastings columns from my original csv to x and y, in Excel I then shifted all the points that I’m keeping, so that the Southwest property pin is at 0,0,10 before applying COTATENATE and turning it into a script.

=CONCATENATE("point ",A2,",",B2,",",C2," ","text ",A2,",",B2,",",C2," ",0.15," ",0," ",C2," \U+000Dtext ",A2,",",B2-0.25,",",C2," ",0.15," ",0," ",E2," ")

 

is what I used. If someone could please steer me to how to bring in the descriptions at a rotation, that would be great please as I need to highlight, select similar, and then apply the rotation. 

But that’s after copying from one drawing to another because I want the drawing “Existing Landscape” to be the one I work in as it has the layers I’ll want to use. I suspected it needs a purge because the script only brought in a small handful of points and must have got hung up on something. But there were no purge-able entities.
Instead I used the script in the “Test with Reduced Points” drawing that has all the original points with their numbers only at 5000,5000, 100 coordinates so they don’t interfere in location. Even though I don’t want to have any negative elevations, I decided to drop everything so the 0 datum would be on the patio corner where I started with the Disto and Moasure, so I adjusted the Excel and created a different script. When I brought that in, I noticed that some labels appeared stacked, while others were staggered as intended. Confused, I moved those points out of the way and reran the first script. Again, most everything was stacked, but some points were missing like when I tried in the other drawing. And there were 2 points where part of the label appeared, but not the point.

So! What setting is allowing this to work once in one drawing but not the other?
 
 

 

0 Likes
Accepted solutions (2)
1,158 Views
6 Replies
Replies (6)
Message 2 of 7

nara7ZXKX
Enthusiast
Enthusiast

I've edited my title in hopes of getting a reply. Thanks!

0 Likes
Message 3 of 7

cadffm
Consultant
Consultant
Accepted solution

Hi,

default setting in Acad is to use running object snaps (if they are on) while automation.

 

Short test: Press [F3] and run script..

 

Better

Change this setting by add a new first line in your script

Osnapcoord 1

 

Now, it doesn't if osnaps are on or not 

Sebastian

0 Likes
Message 4 of 7

richard_387
Advocate
Advocate
Accepted solution

It looks to me as if your point plotting is suffering from the effect of the running snaps, so I think that all your points are plotted on top of each other instead of being missing.

To disable running snaps for one command at a time, you must introduce "_non " before each set of coordinates in the concatenation (notice the space after non before the quote marks).

For example:

=CONCATENATE("point ","_non ",A2,",",B2,",",C2," ","text ","_non ",A2,",",B2,",",C2," ",0.15," ",0," ",C2," \U+000Dtext ","_non ",A2,",",B2-0.25,",",C2," ",0.15," ",0," ",E2," ")

It then does not matter whether running snaps are active or not.

0 Likes
Message 5 of 7

nara7ZXKX
Enthusiast
Enthusiast

Thank you!!

0 Likes
Message 6 of 7

nara7ZXKX
Enthusiast
Enthusiast

Thank you! Yes, it is the snaps. 

Could you also please suggest where and what I'd insert into the script to have the text rotated?

0 Likes
Message 7 of 7

cadffm
Consultant
Consultant

Start the command (text) and check out what Acad ask for,

write down your keystrokes and you know what you have to add (or to change)

Sebastian

0 Likes