Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
My function correctly adds a multiline style but I am having trouble setting the "Color" for the Offset elements to "ByLayer" (please see attachment). They either default to "ByBlock" or only the color of the first offset gets set (not the second one). This is the code:
(defun AddMlineStyle (mlsName outerGap) (if (not (dictadd (cdar (dictsearch (namedobjdict) "ACAD_MLINESTYLE")) mlsName (entmakex (list '(0 . "MLINESTYLE") '(100 . "AcDbMlineStyle") (cons 2 mlsName) '(70 . 0) '(3 . "SPEC Pipe") '(62 . 256) '(71 . 4) (cons 49 outerGap) (cons 49 (* -1 outerGap)) ) ))) (princ (strcat "Mline style already exists: " mlsName)) ) (princ) )
Called like this:
(AddMlineStyle "CTRAY-12" 6.0)
Solved! Go to Solution.