wimal Posted October 10, 2019 Posted October 10, 2019 ((-1 . <Entity name: 7ff419404c90>) (0 . "MLINE") (330 . <Entity name: 7ff4194039f0>) (5 . "259") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbMline") (2 . "STANDARD") (340 . <Entity name: 7ff419403980>) (40 . 20.0) (70 . 0) (71 . 1) (72 . 2) (73 . 2) (10 2254.89 1547.14 0.0) (210 0.0 0.0 1.0) (11 2254.89 1547.14 0.0) (12 0.968639 0.248474 0.0) (13 -0.248474 0.968639 0.0) (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -20.0) (41 . 0.0) (75 . 0) (11 3490.73 1864.16 0.0) (12 0.968639 0.248474 0.0) (13 -0.248474 0.968639 0.0) (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -20.0) (41 . 0.0) (75 . 0)) above code is displaying the association list of a multyline. I need to find out the start and end coordinates of the mline .I can get the first point (association no 10) But how can get the Other end; there are association no 11 two times. I need the get value of second association no 11 _$ Quote
Tharwat Posted October 10, 2019 Posted October 10, 2019 (setq str (assoc 10 <entget>)) (setq end (assoc 11 (reverse <entget>))) 1 Quote
BIGAL Posted October 10, 2019 Posted October 10, 2019 If you use vl, : (setq obj (vlax-ename->vla-object (car (entsel "pick object")))) pick object#<VLA-OBJECT IAcadMLine 000000005841DB50> : (setq co-ords (vlax-get Obj 'coordinates)) (104.0 88.0 0.0 440.0 180.0 0.0 520.0 98.0 0.0) (setq name (vla-get-StyleName obj)) "STANDARD" I did something with mlines need to find again the other variable is the offsets from the main line/s then say you can get the 4 corner points. I think its in the mlinestyle for offsets. Found a good example how to put it into practice https://www.afralisp.net/autolisp/tutorials/dictionaries-and-xrecords.php (setq objdict (namedobjdict)) (setq mldict (dictsearch objdict "ACAD_MLINESTYLE")) (setq mlineStd (dictsearch (cdr (assoc -1 mlDict)) "Standard")) ; replace mline style name (setq offs (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 49)) mlinestd))) This is a two segment mline with + - offsets 3 lines. The offs is a list of the offset values of the mline. (-20.0 0.0 20.0) Unfortunately you need to work out the offset line points if say you want to do a cap, the cap is a Mline style option, so you could create a new mline. with caps then erase old one. I don't believe you can change the style maybe .net ? 1 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.