barristann Posted August 26, 2023 Share Posted August 26, 2023 Is it possible to include angle of a line or polyline? Thank you. http://www.lee-mac.com/dinfo.html Quote Link to comment Share on other sites More sharing options...
exceed Posted August 29, 2023 Share Posted August 29, 2023 (edited) 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 August 29, 2023 by exceed 1 Quote Link to comment Share on other sites More sharing options...
nod684 Posted August 29, 2023 Share Posted August 29, 2023 A bit off-topic. is it just me or it does not work if the UCS is not set to World? Quote Link to comment Share on other sites More sharing options...
StevJ Posted August 30, 2023 Share Posted August 30, 2023 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 1 Quote Link to comment Share on other sites More sharing options...
barristann Posted September 1, 2023 Author Share Posted September 1, 2023 It's perfect. Thank you, exceed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.