Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't Draw a line with Degrees/Minutes/Seconds (AutoCAD 2020)

4 REPLIES 4
Reply
Message 1 of 5
oran.donay
2453 Views, 4 Replies

Can't Draw a line with Degrees/Minutes/Seconds (AutoCAD 2020)

My units are set to Architectural and the angle type is set to the right precision.

Yet, I can't draw a line using DMS.

For example, I insert the first point on the screen (arbitrary point), press "@", then give the length, press "<" and insert my angle 76d55'13''.

When I press Enter, I only see the box is highlighted in red. 

 

Couldn't find the solution on the forum or anywhere else.

 

My only guess is maybe I need to change a system variable...

Any suggestions?

 

Thank you,

Oran

4 REPLIES 4
Message 2 of 5
j.palmeL29YX
in reply to: oran.donay

I don't yet know what causes the problem ( bug?, and it only occurs if "clockwise" is activated), but if you turn off the dynamic input it works well.

 

FYI: In ACAD 2021 it work well as expected.

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 3 of 5
oran.donay
in reply to: j.palmeL29YX

Just installed the 2021 version.

I have the same issue.

Message 4 of 5
j.palmeL29YX
in reply to: oran.donay

In the meantime I saw this behavior in both versions randomly happen. Sometime it works well (in both versions). A moment later it fails, in in the same drawing. I have no idea how to avoid (or to provoke) this. Can't help, sorry.

Jürgen Palme
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Message 5 of 5
john.uhden
in reply to: oran.donay

If you want to use bearings and distances, here's one I made up for use at home where I don't have Civil3D working.

 

(defun c:LineByDirection ( / *error* vars vals done p1 p2 quad bearing ang d)
   ;; John F. Uhden, Sea Girt, NJ, USA
   ;; Program draws lines by bearing and distance (like Land Desktop and C3D)
 
   ;; v1.0 (4-20-2020)
   ;; Bearing format is DD.MMSS but you can skip entering the SS if it is zero.
   ;; Quadrants are 1=NE, 2=SE, 3=SW, and 4=NW.

   (gc)
   (vl-load-com)
   (princ "\nLineByDirection (c)2020, John F. Uhden")
   (defun *error* (error)
     (mapcar 'setvar vars vals)
     (vla-endundomark *doc*)
     (cond
       ((not error))
       ((wcmatch (strcase error) "*QUIT*,*CANCEL*"))
       (1 (princ (strcat "\nERROR: " error)))
     )
     (princ)
   )
   (setq vars '(cmdecho))
   (setq vals (mapcar 'getvar vars))
   (or *acad* (setq *acad* (vlax-get-acad-object)))
   (or *doc* (setq *doc* (vla-get-ActiveDocument *acad*)))
   (vla-endundomark *doc*)
   (vla-startundomark *doc*)
   (mapcar 'setvar vars '(0))
   (command "_.expert" (getvar "expert")) ;; dummy command
   (defun @bearing2angle (quad bearing / dpos dd mm ss ang)
      (if (setq dpos (vl-string-search "." bearing))
         (progn
            (setq dd (read (substr bearing 1 dpos)))
            (or (setq mm (read (substr bearing (+ dpos 2) 2)))(setq  mm 0))
            (or (setq ss (read (substr bearing (+ dpos 4))))(setq ss 0))
         )
         (setq dd (read bearing) mm 0 ss 0)
      )
      (setq ang (+ (* (/ dd 180.0) pi) (* (/ mm 180.0 60)  pi) (* (/ ss 180.0 60 60) pi)))
      (cond
        ((= quad "1")(setq ang (- (* 0.5 pi) ang)))
        ((= quad "2")(setq ang (+ (* 1.5 pi) ang)))
        ((= quad "3")(setq ang (- (* 1.5 pi) ang)))
        ((= quad "4")(setq ang (+ (* 0.5 pi) ang)))
      )
      ang
   )
   ;; Begin the action:
   (if (setq p1 (getpoint "\nStarting point: "))
     (while (not done)
       (initget "1 2 3 4")
       (or
         (and
           (setq quad (getkword "\nQuadrant (1,2,3,4): "))
           (setq bearing (getstring "\nBearing (DD.MMSS): "))
           (setq ang (@bearing2angle quad bearing))
           (setq d (getreal "\nDistance: "))
           (setq p2 (polar p1 ang d))
           (vl-cmdf "_.line" "_non" p1 "_non" p2 "")
           (setq p1 p2)
         )
         (setq done 1)
       )
     )
   )
   (*error* nil)
 )
 (defun c:LBD ()(c:LineByDirection))
 

 

  

John F. Uhden

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report