barristann Posted August 26, 2023 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
exceed Posted August 29, 2023 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
nod684 Posted August 29, 2023 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
StevJ Posted August 30, 2023 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
barristann Posted September 1, 2023 Author Posted September 1, 2023 It's perfect. Thank you, exceed. Quote
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.