Jump to content

survey coordinates


rookie37

Recommended Posts

I sometimes have to draw of survey plans

 

I can draw this manualy drawing very slow because I am cheaking, double cheaking and cheaking again so I don't make a mistake. They are all realitive and a mistake will make them all wrong

 

or I can write this in my menu

 

^C^C_line;0,0;+

@970.947

@115.625

@128.625

 

If I make a mistake it is easy to edit my menu and run it again

 

 

How do I write this in lisp?

Link to comment
Share on other sites

for 88.057

@115.625

Id like to write

 

88.057

109

1

25

115.625

237

19

25

 

or something like that where the values are sepparate but still close together

Link to comment
Share on other sites

I sometimes have to draw of survey plans

 

I can draw this manualy drawing very slow because I am cheaking, double cheaking and cheaking again so I don't make a mistake. They are all realitive and a mistake will make them all wrong

 

or I can write this in my menu

 

^C^C_line;0,0;+

@970.947

@115.625

@128.625

 

If I make a mistake it is easy to edit my menu and run it again

 

 

How do I write this in lisp?

 

i don't understand, you are going to plot lines with the same bearings & distances for multiple occasions (meriting creating a button), or are you just trying to find an easier way to plot lines within autocad? i remember having to draw lines like that @100

Link to comment
Share on other sites

I'm trying to find an easier way to plot lines. I also want to write down those commands. It won't be for multiple occasions.

 

Currently, I change my menu often which is a hassle and that it why I'd rather do it in a lisp program

 

I'm not familure with LDD. Is it a tool in Autocad? It may work but only if I can write down the coordinates I draw

Link to comment
Share on other sites

Hi,

 

I am a surevy draftsperson, and have to draw lines at different bearings all the time. For me it's second nature a bit to type a line at - @10

I was a bit confused when you said you have to change your "menu" all the time, can you explain what you mean?

 

Also, I find mistakes are usually picked up at the end. Usually I would type bearings and distances when creating lot boundaries, and if the boundary dose not close at the end, than I have made a mistake somewhere, and just do a quick check via properties box to see whats wrong.

 

Sorry I can't be more helpful. Will be watching to see if anyone comes up with something clever.

Link to comment
Share on other sites

Try this

;Tip1741:  BD.LSP           Bearing/Distance lines         (c)2001, Joon Hong  $50 Bonus Winner

(defun C:BD  ()
 (setvar "cmdecho" 0)
 (initget 1)
 (setq PT (getpoint "\nPick a starting point: "))
 (initget 1 "NE NW SE SW")
 (setq BR (getkword "\nPick bearing (NE/NW/SE/SW): "))
 (setq OPT (strcase BR))
 (initget 1)
 (setq LEN (getreal "\nType the length: "))
 (setq DEG (getstring "\nType the degree: ")
       minx (getstring "\nType the minute: ")
       SEC (getstring "\nType the second: "))
 (if (= DEG "")
   (setq DEG "0"))
 (if (= minx "")
   (setq minx "0"))
 (if (= SEC "")
   (setq SEC "0"))
 (cond ((= "SW" OPT)
        (setvar "angbase" (cvunit 270 "degree" "radian"))
        (setvar "angdir" 1))
       ((= "SE" OPT)
        (setvar "angbase" (cvunit 270 "degree" "radian"))
        (setvar "angdir" 0))
       ((= "NW" OPT)
        (setvar "angbase" (cvunit 90 "degree" "radian"))
        (setvar "angdir" 0))
       ((= "NE" OPT)
        (setvar "angbase" (cvunit 90 "degree" "radian"))
        (setvar "angdir" 1)))
 (command "line" PT (strcat "@" (rtos LEN) "<" DEG "d" minx "'" SEC "\"") "")
 (setvar "angbase" 0)
 (setvar "angdir" 0)
 (setvar "cmdecho" 1)
 (princ))
(princ "\nType 'BD' to draw lines with bearings")
(princ)

Link to comment
Share on other sites

  • 3 weeks later...

Thank you lpseifert

 

That program is a huge timesaver!

 

However, I still don't know how to set up acad for bearing distance

 

I can change the setup but there are many options to choose

 

rotation

clockwise?

 

direction

n?

e?

s?

w?

 

My ignorance in this reminds me of my Navy days. When I was still very green, I was sent all over the ship asking to borrow some relative bearing grease.

 

:lol:

Link to comment
Share on other sites

Try this

;Tip1741:  BD.LSP           Bearing/Distance lines         (c)2001, Joon Hong  $50 Bonus Winner

(defun C:BD  ()
 (setvar "cmdecho" 0)
 (initget 1)
 (setq PT (getpoint "\nPick a starting point: "))
 (initget 1 "NE NW SE SW")
 (setq BR (getkword "\nPick bearing (NE/NW/SE/SW): "))
 (setq OPT (strcase BR))
 (initget 1)
 (setq LEN (getreal "\nType the length: "))
 (setq DEG (getstring "\nType the degree: ")
       minx (getstring "\nType the minute: ")
       SEC (getstring "\nType the second: "))
 (if (= DEG "")
   (setq DEG "0"))
 (if (= minx "")
   (setq minx "0"))
 (if (= SEC "")
   (setq SEC "0"))
 (cond ((= "SW" OPT)
        (setvar "angbase" (cvunit 270 "degree" "radian"))
        (setvar "angdir" 1))
       ((= "SE" OPT)
        (setvar "angbase" (cvunit 270 "degree" "radian"))
        (setvar "angdir" 0))
       ((= "NW" OPT)
        (setvar "angbase" (cvunit 90 "degree" "radian"))
        (setvar "angdir" 0))
       ((= "NE" OPT)
        (setvar "angbase" (cvunit 90 "degree" "radian"))
        (setvar "angdir" 1)))
 (command "line" PT (strcat "@" (rtos LEN) "<" DEG "d" minx "'" SEC "\"") "")
 (setvar "angbase" 0)
 (setvar "angdir" 0)
 (setvar "cmdecho" 1)
 (princ))
(princ "\nType 'BD' to draw lines with bearings")
(princ)

 

Sorry, couldnt help to grab this, been lookin for something like this for a while now also, just posting to consent. :)

thanks

Link to comment
Share on other sites

 

However, I still don't know how to set up acad for bearing distance

 

I can change the setup but there are many options to choose

 

rotation

clockwise?

 

direction

n?

e?

s?

w?

 

My ignorance in this reminds me of my Navy days. When I was still very green, I was sent all over the ship asking to borrow some relative bearing grease.

 

In what format is the survey data? Surveyor's Units (e.g. 110' N45d30'30"E)?

Post an example of the data you need to input, it would help in telling how to set up your units.

Link to comment
Share on other sites

this is similar, but w/ a few extras, traverse around arc & posts bearing & dist. after line created so one can check that it was inputted correctly.

 

; func dms final out put variable is strdeg

; convert angles in degs to rads

(defun dtr (a)

(* pi (/ a 180.00))

)

(defun rtd (a)

(/ (* a 180.00) pi)

)

(defun arl (/ ang ctrpt dist doc endpt ent half obj pick space ss1 ss2 stpt delta endang startang)

(vl-load-com)

(setq doc (vla-get-activedocument (vlax-get-acad-object))

space (if (= (getvar "cvport") 1)

(vla-get-paperspace doc)

(vla-get-modelspace doc)

)

)

(setq ss2 (ssget "L" '((0 . "LINE"))))

 

(setq obj (vlax-ename->vla-object (ssname ss2 0))

pick (vlax-get obj 'endpoint)

)

(setq half (/ (vla-get-length obj) 2.0)

dist (vlax-curve-getdistatpoint obj

(vlax-curve-getclosestpointto obj pick)))

(if (

(setq stPt (vlax-get obj 'startpoint)

endPt (vlax-get obj 'endpoint)

)

(setq stPt (vlax-get obj 'endpoint)

endPt (vlax-get obj 'startpoint)

)

)

(setq rad (getdist endPt "\nRadius of arc: ")

ang (angle stPt endPt)

ctrPt (polar endPt (- ang (/ pi 2)) rad)

startang (+ pi (- ang (/ pi 2)))

delta (getangle "\nDelta or Enter to input arc length: ")

)

(if (= delta nil)

(progn

(setq arc (getreal "\nEnter Arc Length: ")

delta (* (/ arc rad) (/ 180 pi))

delta(abs (* pi (/ delta 180.0))))))

 

(if (minusp rad)

(setq startang (angle ctrPt endPt)

endang (+ startang delta))

(setq endang (angle ctrPt endPt)

startang (- startang delta))

)

(vlax-invoke space 'addarc ctrPt (abs rad) startang endang)

(setq curveobj (vlax-ename->vla-object (entlast))

endpoint (vlax-curve-getStartPoint curveobj)

startpoint (vlax-curve-getendPoint curveobj))

)

(princ)

 

;got from Jeff Mishler Autodesk Forum

 

(defun dms ()

(setq deg (getreal "\nEnter degs: "))

(if (= deg nil)

(setq deg 0))

(setq mins (getreal "\nEnter mins: "))

(if (= mins nil)

(setq mins 0))

(setq sec (getreal "\nEnter secs: "))

(if (= sec nil)

(setq sec 0))

(setq ang_degs (+ deg (/ mins 60.0) (/ sec 3600.0))))

 

;error trapper

(defun c:trav (/ *error*)

(setq b (getvar "osmode"))

(defun *Error* (Err)

(cond

(or

(not Err)

(member Err (quote ("console break" "Function cancelled" "quit

/ exit abort")))

)

)

(princ (strcat "\nError: " Err))

(setvar "osmode" b)

(if b

(setvar "osmode" b)

)

(princ)

)

 

(setq b (getvar "osmode"))

(setvar "osmode" 0)

(graphscr)

(setq Stpt (Getpoint "\nPick starting point or Enter for Lastpoint: "))

(if (null stpt)(setq stpt (getvar "LASTPOINT")))

 

(while (setq d (getstring "\nEnter Distance or [Arc]: "))

(if (= (strcase d) "A")

(progn

(arl)

(if (minusp rad)

(setvar "lastpoint" startpoint)

(setvar "lastpoint" endpoint))

(c:trav))

(progn

(setq d (atof d))

(print "4=NW | 1=NE")

(print "-----+----- 5=Last bearing")

(print "3=SW | 2=SE Enter quadrant: ")

(initget "1 2 3 4 5")

(setq quad (atof (getKword)))

(if (= quad 5)(setq bear bear)

(progn

(dms)

(cond ((= quad 1)(setq bear (- 90.0 ang_degs)))

((= quad 2)(setq bear (+ 270.0 ang_degs)))

((= quad 3)(setq bear (- 270.0 ang_degs)))

((= quad 4)(setq bear (+ 90.0 ang_degs)))

); end cond

); end progn

); end if

))

 

 

 

(setq newpt (polar stpt (dtr bear) d))

(command "LINE" stpt newpt "")

(setq stpt newpt)

(setvar "LASTPOINT" newpt)

(cond

((= quad 1) (princ (strcat "N" (rtos deg 2 0) "-" (rtos mins 2 0) "-" (rtos sec 2 0) "E" " " "Dist=" (rtos d 2 2))))

((= quad 2) (princ (strcat "S" (rtos deg 2 0) "-" (rtos mins 2 0) "-" (rtos sec 2 0) "E" " " "Dist=" (rtos d 2 2))))

((= quad 3) (princ (strcat "S" (rtos deg 2 0) "-" (rtos mins 2 0) "-" (rtos sec 2 0) "W" " " "Dist=" (rtos d 2 2))))

((= quad 4) (princ (strcat "N" (rtos deg 2 0) "-" (rtos mins 2 0) "-" (rtos sec 2 0) "W" " " "Dist=" (rtos d 2 2))))

((= quad 5) (princ "\nUsed Last Bearing" ))

(t nil)

)

 

) ; end while

(*error* nil)

)

Link to comment
Share on other sites

this is similar, but w/ a few extras, traverse around arc & posts bearing & dist. after line created so one can check that ...

)

 

 

Wow! thank you for your trouble. Im embarressed to say that I don't know how to run it

 

What do I type to start the program?

survey data.pdf

Link to comment
Share on other sites

It would appear that your bearing data is in Whole Circle format, and NOT in American Surveyor units.

 

So I don't know whether the proffered lisps will manage. :cry:

 

As suggested previously, you will need to set your angle zero to North, and have the angles going clockwise.

Link to comment
Share on other sites

TRAV, I hope this is what you're looking for and not an annotator; I'm not sure what the PDF attached is meant for. BTW, my units are decimal, surveyors units & east.

Link to comment
Share on other sites

  • 7 months later...
I sometimes have to draw of survey plans

 

...or I can write this in my menu

 

^C^C_line;0,0;+

@970.947

@115.625

@128.625

 

 

Hope this thread's still being monitored by Rookie37 :)

 

Someone asked, but I don't think you answered... how did you write this in "what" menu???

 

Are you referring to the command line?

 

I'm looking for a way to make Autocad take surveyor traverse data and just draw it; automatically; programatically, or however one might describe it.

 

What I'm after is... if I have the coordinates of the starting point, then all the bearings and distances in a text file, how can I import that or can it be imported, having Autocad automatically draw those lines.

 

This is a small sample of a City annexation proposal which I'm using as an example:

 

Starting at these coords: 1922619.07,1720807.05

@2038.50

@247.48

@313.36

@31.02

@313.36

@31.02

 

I tried entering this on the command line which Autocad promptly vomited back out:

 

^C^C_line;1922619.07,1720807.05;+

@2038.50

@247.48

@313.36

@31.02

@313.36

@31.02

 

I primarily work in GIS (Mapinfo) and can accomplish this similar task with mid/mif files (but not with easting/northing surveyor data... was hoping it could be done in AC as well. (But I smell 3rd party software waiting to pounce on this one :)

 

I'm running vanilla AC 2005, Units and direction are setup accordingly.

 

Thanks in advance.

 

Dave

Link to comment
Share on other sites

I think that the OP was not being very efficient by wanting a one-off line as a menu item.

 

You have already done more than enough typing to draw your line. When you were typing at the command line, why the ";+"? AutoCAD draws the lines as you go, and so a simple Enter at those points would have produced the line, point by point.

 

But if you already have a data file in this format:-

1922619.07,1720807.05

@2038.50

@247.48

@313.36

@31.02

@313.36

@31.02

you can copy this (Cntrl C) (Note you need two spaces after the last character), start the line command, and when the command line says "Specify first point", paste (Cntrl V), and the lines will be drawn. In your particular case, you may need to delete the first two lines to get to your start point, but all lines have been drawn very quickly, with NO third-party software needed. :D

Link to comment
Share on other sites

WE HAVE A BINGO!

 

This is exactly what I was looking for. Yes, I have the bearings and distances in a text file. As you've probably seen, I suppose more often than not, a spatially challenged, non-surveyor party (read: lawyer) can turn what could be a paragraph of traverse information into two pages of wordy jibberish.

 

When I recieve an Annexation proclaimation from a City, which usually has a lengthy, agonizingly long legal description, I go through it with a highlighter, marking just the bearings and distances. I wanted to be able to transcibe those to a text file then import (or as you've shown here, paste directly into AC. Sometimes, I have had such documents emailed to me and in Word format. Which I copy and paste the various surveyor related strikes to a text file. By doing this, I can COMPLETELY reproduce without equivocation, precisely what the author created, right or wrong!

 

... why the ";+"?

 

Well, because I didn't realize this could be done the way you showed. The OP used the ";+" at the end of each line. I thought that was simply a command to tell AC to continue drawing with the next line.

 

But you've cleared it up

 

Sure this isn't neccessary for many "normal" land parcels... but when a City or Municipality annexes land into their City Limits... their leagal description can sound like the lyrics to an old fashion Square Dance!!!

 

Thanks so much Eldon, much appreciated!

 

Dave

Link to comment
Share on other sites

Follow-up observations:

 

This works beautifully Eldon! I'm going through an old proclaimation I recieved in PDF format (just to test this new learning).

 

In this particular document, there are 6 leagal descriptions (because of different landowners) which constitute a mere few acres of land which was formerly right-of-ways which were abandoned and petitioned to be annexed by the city.

 

Using this method of pasting the bearings and distances into AC is as I expected, a little faster, but as important, it allows for fewer errors on my part. I don't have to look back and fourth from screen to screen, or screen to paper document only to loose my place and omit a particular point.

 

MOST EXCELLENT!!!

 

Thanks again Eldon!

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...