Author Topic: Draw site from list of bearings w/ distance  (Read 1861 times)

0 Members and 1 Guest are viewing this topic.

GDF

  • Water Moccasin
  • Posts: 2081
Draw site from list of bearings w/ distance
« on: August 17, 2007, 11:59:56 AM »
I am trying to come up with a code that will read a set of bearings and distance and draw a site plan.

N68°54'52"E 341.30'

Here is a crude first step...
Code: [Select]
(defun SnapAngleFunction ()
    (or (member "geomcal.arx" (arx))
      (arxload "geomcal")
    )
    (and           
      (setvar "SNAPANG" (atan (/ 12 (distof LWID))))
    ) 
)
(defun c:tEST ()
  (setvar "cmdecho" 0)
  (SnapAngleFunction)
  (setq pnt1 (getpoint "\n* Pick beginning point of Line *"))
  (setq pnt2 (getpoint pnt1 "\n* Pick beginning point of Line *"))
  (command "line" pnt1 pnt2 "")
  (princ)
)

My first question is how would I modify the SnapAngleFunction to snapang to the bearing: N68°54'52"E? Or am I approaching this all wrong.

Gary
« Last Edit: August 17, 2007, 12:01:12 PM by Gary Fowler »
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Draw site from list of bearings w/ distance
« Reply #1 on: August 17, 2007, 12:14:34 PM »
This would suggest , just setting units to survey and then use a batch file with your courses in it....


as in


PLINE   @ Angle, Dist (your data here....)
repeat until done....
Be your Best


Michael Farrell
http://primeservicesglobal.com/

GDF

  • Water Moccasin
  • Posts: 2081
Re: Draw site from list of bearings w/ distance
« Reply #2 on: August 17, 2007, 12:24:02 PM »
This would suggest , just setting units to survey and then use a batch file with your courses in it....


as in


PLINE   @ Angle, Dist (your data here....)
repeat until done....


Thanks, my mind did not want to work this morning. I will give it a try.

Gary
Why is there never enough time to do it right, but always enough time to do it over?
BricsCAD 2020x64 Windows 10x64

Dinosaur

  • Guest
Re: Draw site from list of bearings w/ distance
« Reply #3 on: August 17, 2007, 12:54:25 PM »
Michael, if I were drawing the courses individually, my syntax would be " @123.45<N65d43'21"E " with the appropriate numbers  and bearing quadrants replacing the ones I used.  Would not the batch file need to follow the same syntax?

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Draw site from list of bearings w/ distance
« Reply #4 on: August 17, 2007, 12:59:44 PM »
DinØ,

NO, If you wer doing this you would follow the prompts for drawing using the TRANSPARENT commands in C3D my friend.

So yours would be more like:

PLINE
'BD
1
89.5623
250.67
2
45.2546
320.14
etc....


for what it's woth YES it would need be @dist,ang....My fingers and brain woke up on different sides of the planet.
« Last Edit: August 17, 2007, 01:36:07 PM by mjfarrell »
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Dinosaur

  • Guest
Re: Draw site from list of bearings w/ distance
« Reply #5 on: August 17, 2007, 01:09:14 PM »
Of course, that is one of the most well hidden features of Civil 3D and one of my favorites, but I have a feeling Gary is using pure French vanilla flavor Autocad and needs the method from that world.