Jump to content

Lee Mac's Dynamic Information Tool...angle? Please help.


barristann

Recommended Posts

It is easy to know the angle of a line, but it is difficult to know the angle of a polyline because it has many nodes.

 

I haven't read all of them, but his code has very clear structure, 

so, It can be applied with very little modifications.

 

approx. 403 line, you have to add "ANGLE"

                (setq tStr (strcat "{\\C4;" (dxf 0 iLst) "}"))

                (foreach prop
                 '(
                    ANGLE
                    LAYER
                    COLOR
                    LINETYPE
                    LINEWEIGHT

even if put only these 5 characters

then test it, the radian angle will appear.

 

and if you want degree,

you have to add these 4 lines

(
  (eq prop 'ANGLE)
  (vl-princ-to-string (* 180 (/ (vlax-get-property iObj prop) pi)))
)

in approx. 450 line, inside of (cond~~)

like this

                          (cond
                            (
                              (eq prop 'COLOR)

                              (_GetColour iLst)
                            )
                            (
                              (eq prop 'ANGLE)
                              (vl-princ-to-string (* 180 (/ (vlax-get-property iObj prop) pi)))
                            )
                            (
                              (vl-position prop '(DISPLAYLOCKED CLOSED))

                              (_Stringify (vlax-get-property iObj prop))
                            )

 

Edited by exceed
  • Like 1
Link to comment
Share on other sites

19 hours ago, nod684 said:

A bit off-topic.

is it just me or it does not work if the UCS is not set to World?

 

Not just you.

Won't play at all for me if UCS not set to World.

 

Steve

  • Agree 1
Link to comment
Share on other sites

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