show line direction

show line direction

Anonymous
Not applicable
5,999 Views
31 Replies
Message 1 of 32

show line direction

Anonymous
Not applicable

Hi everyone,

can you help with a lisp that shows the direction of selected lines,

like this lisp for polyline:

https://autocadtips1.com/2014/06/24/autolisp-polyline-direction-preview/#:~:text=You%20simply%20run%... 

and also ask for lines to change direction if needed.

 

It would be very helpfull.

Thank you

Eyal.

0 Likes
Accepted solutions (3)
6,000 Views
31 Replies
Replies (31)
Message 21 of 32

Anonymous
Not applicable

THANK YOU @Moshe-A ,

Thats great!

 

Eyal

0 Likes
Message 22 of 32

Moshe-A
Mentor
Mentor

@Anonymous  hi,

 


@Anonymous wrote:

THANK YOU @Moshe-A ,

Thats great!

 

Eyal


here is an improvement \ new cool option 😀  (lisp file attached)

 

Aside to Show\Reverse options you now have a new Flip option which flips the arrow side. each line now hold in its database XDATA (eXtended Data) that denote if the line is in its origin\reversed direction and if the arrows are in the left\right side of the line. so now the reverse option does not flip the arrows side.

 

this cool feature could not be made without 2 beautiful functions [(MeGetXdata) and (MeSetXdata)] by MENZI ENGINEERING GmbH, Switzerland.  so the credits goes to MENZI.

 

Another feature to note is while you are still in the LID selecting lines,  you can use the Previous option to quickly select the same lines.

 

enjoy

Moshe

 

0 Likes
Message 23 of 32

Moshe-A
Mentor
Mentor

@Anonymous 

 

Made more fine tuning and this is the final version 😀

also a new prompt to let you choose a new color for the arrows.

 

enjoy

Moshe

Message 24 of 32

Anonymous
Not applicable

Thank you @Moshe-A ,

it is great,

Can I ask for one more adaptation for this lisp,

If you can, I want to enable the "S" for the show, and "R" for reverse, and "F" for flip to be clickable, like the other commands in Autocad, it saves time instead of typing.

 

Just if it is no trouble,

Thank you

Eyal.

 

0 Likes
Message 25 of 32

Moshe-A
Mentor
Mentor
Accepted solution

@Anonymous ,

 

here you go

 

 

Message 26 of 32

Anonymous
Not applicable

Hi @Moshe-A ,

Thank you very much!!!

you are a champ!

it will be very useful for me,

 

Good day!

Eyal

 

0 Likes
Message 27 of 32

Sea-Haven
Mentor
Mentor

Just a suggestion for pick color use (setq ask  (acad_colordlg clr)) where clr is a default color number you set.

 

Re the choices your welcome to use this

(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (not but)(setq but 1))
(setq ans  (ah:butts but "V"   '("Please choose " "Show" "Reverse" "Flip")))

screenshot280.png 

Message 28 of 32

Anonymous
Not applicable

Hi @Sea-Haven ,

It looks awesome to have it on the table, can you please add this to @Moshe-A 's lisp?

the last one in this post.

Thank you,

Eyal

 

0 Likes
Message 29 of 32

Moshe-A
Mentor
Mentor

@Sea-Haven ,

 

Thanks for the advice but in this case i think, a dialog is not preferrable cause at the command line it works quickest.

 

Moshe

 

0 Likes
Message 30 of 32

Hamza.itani
Contributor
Contributor
Hi,
Please, can this be modified to work with polylines?
0 Likes
Message 31 of 32

Kent1Cooper
Consultant
Consultant

@Hamza.itani wrote:
....can this be modified to work with polylines?

Have you followed the link in Message 1?  It's supposedly [I haven't looked] something that shows the direction of Polylines.

Kent Cooper, AIA
0 Likes
Message 32 of 32

Hamza.itani
Contributor
Contributor

@Kent1Cooper wrote:

@Hamza.itani wrote:
....can this be modified to work with polylines?

Have you followed the link in Message 1?  It's supposedly [I haven't looked] something that shows the direction of Polylines.


Yes, I have. But the original lisp lacks the ability to select multiple polylines at once plus reversing on the fly, which are useful.

 

0 Likes