Author Topic: Simple plot plans in Vanilla Acad  (Read 1507 times)

0 Members and 1 Guest are viewing this topic.

T-Square

  • Guest
Simple plot plans in Vanilla Acad
« on: January 10, 2010, 01:50:07 AM »
Anyone know of a lisp/dcl/vba app that I can use to enter bearings and distances. I have an old school client that uses an HP calc program to enter his points which he then prints out... which has the northing easting on it.

I know about using something like:

@132.06<N00D08'23"

type of command line. I am hoping to make it relatively easy to enter the bearings and then label the bearing line. I am trying to find something that would actually read the txt files he outputs or enter the coords easily, there is some coding that is not compatible. Trying to avoid having to retype his entries.

This is a small client and I just want to be able to meet his needs... cheaply. :-)

Yes. I do know I can use my Revit Structural Suite 2010 to enter bearings and such. But, it would be nice to have the ability in good ol vanilla autocad.

I have a routine to label the bearing and distance above and below a selected line. I guess a nice dcl or vba to simply enter the bearing numbers and not the d/m/s would be easy enough. Something like that.

Of course... ideas and suggestions are always welcome.

Trying to be diversified enough to have work...which I am sure you all know is hard to come by now.

Thanks in advance. I can post more info if you need it.

Revit Structural Suite 2010
AutoCAD Structural Detailing 2010
AutoCAD 2010

My client uses an HP48GX calculator which is then connected to an old Win98 machine which is run in dos mode to read the data from the HP calculator. See the sample output file.

Code: [Select]
%%HP: T(3)A(D)F(.);
{ { 51 } {
[ 1000 1000 0 ]
"" } {
[ 983.998709465 1055.17663637 0 ]
"" } {
[ 691.067915851 970.226355898 0 ]
"" } {
[ 914.129786383 1178.23693716 0 ]
"" } {
[ 861.620525524 1223.08364239 0 ]
"" } {
[ 823.891941539 1244.78559941 0 ]
"" } {
[ 797.762363154 1190.77407163 0 ]
"" } {
[ 691.228625012 969.674135533 0 ]
"" } 0 {
[ 871.601242784 1162.9519948 0 ]
"" } 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 {
[ 983.842735179 1055.71447652 0 ]
"" } 0 {
[ 914.431681482 1177.53321179 0 ]
"" } {
[ 862.257101291 1222.20979698 0 ]
"" } {
[ 862.270107747 1222.20098794 0 ]
"" } 0 0 0 0 0 0 0
0 0 0 0 0 0 0 }
« Last Edit: January 10, 2010, 02:00:12 AM by T-Square »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Simple plot plans in Vanilla Acad
« Reply #1 on: January 10, 2010, 09:49:35 AM »
If you are looking for another way to input lot lines, I have had the forever. No idea who the author was.
Must be 15+ years old but it may give you some ideas.
Code: [Select]
;BRNG converts user friendly input of bearings to surveyor's input
 ;
 ; Get input
(defun brng ()


  (setq loop 1)
  ;(while loop
    (initget 0 "NE NW SE SW")
    (setq heading  (getkword "\nenter heading <NE NW SE SW> .."))
    (If  (= heading nil)
      (EXIT)
    )
    (setq heading (strcase heading) )
  ;)


  (initget 5)
  (setq deg (itoa (setq deg (getint "\nenter degrees.."))))
  (initget 5)
  (setq mins (itoa (setq mins (getint "\nenter minutes.."))))
  (initget 4)
  (setq sec (getreal "\nenter seconds.."))
  (if (= sec nil)
    (setq sec 0)
  )
  (setq sec (rtos sec 2 0))
 ;end input
  (setq head (substr heading 1 1))
  (setq foot (substr heading 2 1))

  (setq  bearing  (strcat "<" head deg "D"  mins  "'" sec (chr 34) foot ))
  (setq  hd head
         ft foot
  )
  (if (= heading "NW")
    (setq hd "S"
          ft "E"
    )
  )
  (if (= heading "SW")
    (setq hd "N"
          ft "E"
    )
  )
  (setq  ang (strcat hd deg "d" mins "'" sec (chr 34) ft))
) ;end defun
 
 ;;C:COGO is a more user friendly input format for straight line input
 ;;of coordinate geometry
(defun c:cogo ()
  (setq Lp 1)
  (while (= Lp 1)

    (brng)
      (initget 7)
    (SETQ DIST (* 12 (getreal "enter distance... <decimal feet>..")))
    (setq pt1 (getpoint "enter start point.."))
    (if  (= pt1 nil) (setq pt1 nextpt))
    (if (= pt1 nil) (exit))
   
    (command "line" pt1)
    (setq pt2 (strcat "@" (RTOS DIST 2 2) bearing))
    (command pt2 "")
    (setq d (strcat head " " deg "%%d" mins "'"
              sec (chr 34) " " foot "    " (RTOS (/ dist 12) 2 2) "'")
    )
    (setq oo 1.0)
    (if  (= heading "NW")
      (setq oo -1.0)
    )
    (if  (= heading "SW")
      (setq oo -1.0)
    )
    (setq midpt (polar pt1 (getvar "lastangle") (/ DIST 2.0)))
    (setq txtpt (polar midpt (+ (getvar "lastangle") (/ pi 2.0)) oo))
    (setq nextpt (getvar "lastpoint"))

    ;; Check if the drawing height is set to 0:
    (setq dwg_style (getvar "textstyle"))
    (setq styledata (tblsearch "style" dwg_style))
    (setq dwg_ht (cdr (assoc 40 styledata)))

    (if  (= dwg_ht 0)
      (command "text" "c" txtpt "" ang d "")
      ;; ELSE do this
      (command "text" "c" txtpt ang d "")
    )
    (prin1)
  ) ; end while
) ;end defun

(princ "\n\nType Cogo to start.")

(princ)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Simple plot plans in Vanilla Acad
« Reply #2 on: January 10, 2010, 09:52:58 AM »
Quote
Trying to be diversified enough to have work...which I am sure you all know is hard to come by now.

I know the feeling, I'm looking around myself. Custom Home Design is dead here in central Florida.
Looking for other ways to put food on the table.  ;-)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

T-Square

  • Guest
Re: Simple plot plans in Vanilla Acad
« Reply #3 on: January 11, 2010, 02:02:36 PM »
CAB,

Your routine works well. Thanks.

You have been very gracious in your assistance to me over the years and I am grateful. I'll be donating later this year. :-)

I'm going to have to work with the surveyor to see if he and I can get a more csv import friendly type of output from his HP calculator. He gave me some sample files that seem to work ok once I clean up the output txt file. Basically make it a csv by removing spaces, extra lines and adding commas. I have a subdivision that he wants me to cad up but when I converted the output txt file to a csv it creates something that looked like a scribble. Thus my need for an easy manual input method. Old school, but it works. I like old school.

I've tried using some vba apps only to discover VBA doesn't come with 2010. So, I downloaded it, installed it and then realized I was using the ASD executable and not the ACAD executable... which meant I had to spend the time to redo my whole menu, toolbar, etc., layout. Argggggggggggg...  So, I am lean mean and clean again. But alas... times are lean, my plate is clean... which makes me mean. hahahahaha... Christmas sucked this year. It weighs heavy on a mans soul.

I digress...

Thanks again CAB. I appreciate your help.

Have an Excellent... and Busy Day!

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Simple plot plans in Vanilla Acad
« Reply #4 on: January 11, 2010, 02:26:47 PM »
Thanks for the kind words Tim.

Could you post an actual text file of the HP output? And maybe the geometry they represent.

Are those points just that? And you need to draw & label lines between them?

I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.