- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I found one lisp program which will change object including block layer to bylayer , but this one have no option to select desired block, once it run entire drawing block and object will change to bylayer, can you edit and add one option to select desired block or object.
(defun c:All2BYLA nil
(vlax-for block (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
(vlax-for obj block
(if (wcmatch (vla-get-objectname obj) "AcDb*Dimension,AcDb*Leader,AcDb*MLeader")
(foreach prop '(Color DimensionLineColor ExtensionLineColor LeaderLineColor LeaderColor TextColor)
(vl-catch-all-apply 'vlax-put-property (list obj prop acbylayer))
)
(vl-catch-all-apply 'vla-put-color (list obj acbylayer))
)
)
)
(princ)
)
(vl-load-com) (princ)
Solved! Go to Solution.