Jump to content

Recommended Posts

Posted

i usually enter angles as a decimal but if i have to type angles in command line as degrees minutes second , have i to convert it to decimal then enter the value or there is another way

thanks

Posted

You should be able to enter, for instance, 29d12'4" at the command line for angle.

Posted

It would help to change the units for Angle Type to surveyors units, if you have not already.

Untitled.jpg

Posted

Its a pity Autodesk over the years has not has added a DDD.MMSS option, have a look at most calculators. Using lisp to draw bearing and distance line work, so much faster with no "d"

Posted
Its a pity Autodesk over the years has not has added a DDD.MMSS option, have a look at most calculators. Using lisp to draw bearing and distance line work, so much faster with no "d"

 

As the Civil 3D package they sell to do this type of work allows you to set angle and direction entry to dd.mmss I doubt they will ever add it to vanilla AutoCAD. It's a selling point for Civil 3D now.

Posted (edited)
BIGAL said:
Its a pity Autodesk over the years has not has added a DDD.MMSS option, have a look at most calculators. Using lisp to draw bearing and distance line work, so much faster with no "d"

 

 

my typing skill is slow, example 

@ 14.234<36d6'11" 

it's quite difficult to type in this manner @ ### < DDd mm' ss"

 

normally i use this lisp to substitute with blank [space bar] , a bit faster

example:

"14.234 36 6 11" = @ 14.234<36d6'11"

"14.234 45" = @ 14.234<45d

"12 34 6" = @ 12<34d6'

;function

(defun dt_dd_mm_ss (str / l) ; return list (dist angle)

 (if (and str

          (setq l (read (strcat "(" str ")")))

          (vl-every 'numberp l)

          (and (<= 0. (cadr l)) (< (cadr l) 360.))

          (vl-every ''((x) (and (<= 0. x) (< x 60.))) (cddr l))

          )

   (list (car l)

         (angtof

           (apply 'strcat

                  (mapcar ''((a b c) (strcat (rtos a 2 c) b)) (cdr l) '("d" "'" "\"") '(0 0 2))

                  )

           )

         )

   )

 )



;@14.234<36d6'11"

;(dt_dd_mm_ss "14.234 36 6 11")

;(14.234 0.630117) 



;@14.234<36d5'

;(dt_dd_mm_ss "14.234 36 5")

;(14.234 0.629773)



;;example convert to macro string

;(setq l (dt_dd_mm_ss "14.234 36 5"))

;(strcat "@" (rtos (car l) 2 3) "<" (angtos (cadr l) 1 4))

;@14.234<36d5'0\"



;;example simulate command line:

(defun c:myline (/ p1 p2 l *error*)

 (defun *error* (msg) nil)

 (setq p1 (getpoint "\nSpecify 1st point: "))

 (while (setq p2 (if (vl-consp (setq p2 (getpoint p1 "\nSpecify next point or : ")))

	    p2

	    (progn (while (not (setq l (dt_dd_mm_ss (getstring t "\nInput distance_dd_mm_ss ( _ space bar spacing ) : \n")))))

		   (apply 'polar (cons p1 (reverse l)))

		   )

	    )

       )

   (entmakex (list '(0 . "LINE") (cons 10 (trans p1 1 0)) (cons 11 (trans p2 1 0))))

   (setq p1 p2)

   )

 (princ)

 )


 

p/s: sorry if posting code not in lisp forum

Edited by hanhphuc
BBcode in code tags removed
Posted

Nice one hanhphuc mine is 2 inputs dist and bearing and uses polar for new pt.

Posted
Nice one hanhphuc mine is 2 inputs dist and bearing and uses polar for new pt.

 

Some users will make mistake with decimal ddd.mmss (which many surveyors using this format as input)

Example:

1d2'5" should be written as 1.0205

Neither 1.205 nor 1.025..

 

Maybe that's the reason standard autocad still using macro string as input, besides user may be confused value of 0.50 is real number or degrees 0d50'

 

My $0.02

Posted
Tombu where is DDD.mmss ?

 

In a Civil 3D drawing or template Toolspace Settings tab right-click Active drawing name at the top and pick Edit Drawing Settings…

On the Ambient Settings tab expand both Angle & Direction and set the Format for each to DD.MMSSSS (decimal dms)

AmbientSettings.PNG

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