Give Line direction clock wise

Give Line direction clock wise

avinash00002002
Collaborator Collaborator
123 Views
7 Replies
Message 1 of 8

Give Line direction clock wise

avinash00002002
Collaborator
Collaborator

Hi!

I need help that I have select a line at any direction it always give me clockwise direction p1 and p2 point.

Avinash

0 Likes
124 Views
7 Replies
Replies (7)
Message 2 of 8

Moshe-A
Mentor
Mentor

@avinash00002002  hi

 

Not sure what you mean but if you have angle in CCW, subtract 270 [ (* pi 1.5) ] from it and you will have CW

 

Moshe

0 Likes
Message 3 of 8

autoid374ceb4990
Collaborator
Collaborator

A LINE has a beginning point and end point. Were the lines drawn P1 to P2?  Try drawing one P2 to P1.

0 Likes
Message 4 of 8

Kent1Cooper
Consultant
Consultant

If I understand correctly what you want, read about the ANGBASE and ANGDIR System Variables.  With them, you can have angles measured in relation to any direction you want to be zero degrees [for example, upward instead of the default rightward direction], and in the clockwise direction instead of the default counter-clockwise.  No customization is needed.

Kent Cooper, AIA
0 Likes
Message 5 of 8

Sea-Haven
Mentor
Mentor

Like @Kent1Cooper if you type Units and in ACAD the angular values are on the right if I remember correctly. This is same thing but in Bricscad. The 90 sets the 0 angle to be North.

 

SeaHaven_0-1757983608169.png

 

0 Likes
Message 6 of 8

ryanatkins49056
Enthusiast
Enthusiast

Not entirely sure what you're after but I'll take a guess to try and help a things along.

 

(defun c:getlineangle ( / lineitem)
  (setq lineitem (entget (car (entsel))))
  (* (angle (cdr (assoc 10 lineitem)) (cdr (assoc 11 lineitem))) (/ 180 pi))
);(defun)

 The above will only work if you select a line but it will print to the command line the angle it is drawn at.

 

As always if you could provide more information as to what exactly you're after or trying to do would be helpful.

0 Likes
Message 7 of 8

Kent1Cooper
Consultant
Consultant

@ryanatkins49056 wrote:

... it will print to the command line the angle it is drawn at.

....


... but always and only the angle as measured CCW from to-the-right as zero degrees.  Using entity data, it is unaffected by the ANGBASE and/or ANGDIR System Variable settings.  Likewise with the VLA and (getpropertyvalue) approaches' "Angle" properties.

However, all that is really needed for a Line is to have ANGBASE/ANGDIR set as you want them, and simply select the Line and look at its angle as reported in the Properties palette.  That does honor whatever settings you have in those System Variables.  No command, much less any customization, is required.  But if you don't mind invoking a command, a simple LIST command also honors those settings in its report of the angle of a Line.

Kent Cooper, AIA
0 Likes
Message 8 of 8

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:

.... if you type Units and in ACAD the angular values are on the right if I remember correctly. ...


Here's where they are in Acad2026:

Kent1Cooper_0-1757988720589.png

Yellow highlighting shows the initial defaults, but set them however you prefer.

Kent Cooper, AIA
0 Likes