isutheparambil Posted February 21, 2018 Share Posted February 21, 2018 (edited) Hi friends, I am looking for a solution to split a specific part from an existing block (as a normal cad object) as i used the same block in my drawing that more than 100 times. I know that component how to make for editing within the block if that is a Dynamic Block. But now i need that component separate from the block itself as a normal cad entity, and the remain part as a block same as before (without the separated entity). If some one have an idea how can do this, please let me know... Edited February 21, 2018 by isutheparambil edit Quote Link to comment Share on other sites More sharing options...
rlx Posted February 21, 2018 Share Posted February 21, 2018 like this? : http://www.lee-mac.com/addobjectstoblock.html Quote Link to comment Share on other sites More sharing options...
isutheparambil Posted February 21, 2018 Author Share Posted February 21, 2018 like this? : http://www.lee-mac.com/addobjectstoblock.html Hi rlx, Thank you for your prompt reply. The lisp you provided is a nice one from Lee Mac. Unfortunately for my inquiry its not work. I don't need to remove any parts from the drawing. I need to replace a part from the block to the drawing. from the provided lisp, the command remove will removing the component permanently. I need to remain the component on the drawing on place and do not need exist on the block itself. Quote Link to comment Share on other sites More sharing options...
rlx Posted February 21, 2018 Share Posted February 21, 2018 Hi rlx, Thank you for your prompt reply. The lisp you provided is a nice one from Lee Mac. Unfortunately for my inquiry its not work. I don't need to remove any parts from the drawing. I need to replace a part from the block to the drawing. from the provided lisp, the command remove will removing the component permanently. I need to remain the component on the drawing on place and do not need exist on the block itself. Lee has many programs , also this one : http://www.lee-mac.com/upgradedburst.html This might be closer to what you want. I suppose his program can be modified in such a way it does exactly what you want but I rather let Lee do that because he's the author (and smarter) Quote Link to comment Share on other sites More sharing options...
ReMark Posted February 21, 2018 Share Posted February 21, 2018 Please provide a copy of the block in question as a .dwg file. Indicate what has to be removed as well as what has to remain. Also specify block name(s) where applicable. An image file is of no use. It must be a .dwg file. Quote Link to comment Share on other sites More sharing options...
isutheparambil Posted February 21, 2018 Author Share Posted February 21, 2018 Lee has many programs , also this one : http://www.lee-mac.com/upgradedburst.html This might be closer to what you want. I suppose his program can be modified in such a way it does exactly what you want but I rather let Lee do that because he's the author (and smarter) Yes ..You are right As Lee is the author, he can o something on it. Quote Link to comment Share on other sites More sharing options...
isutheparambil Posted February 21, 2018 Author Share Posted February 21, 2018 Please provide a copy of the block in question as a .dwg file. Indicate what has to be removed as well as what has to remain. Also specify block name(s) where applicable. An image file is of no use. It must be a .dwg file. Hi Re mark.. At present I left from my office. Once I reach tomorrow in to office, of course I will post the drawing. Thanks Re mark.. Quote Link to comment Share on other sites More sharing options...
rlx Posted February 21, 2018 Share Posted February 21, 2018 else just make new block , rename old block , insert new block plus text , and tranfer data. Quote Link to comment Share on other sites More sharing options...
isutheparambil Posted February 22, 2018 Author Share Posted February 22, 2018 Please provide a copy of the block in question as a .dwg file. Indicate what has to be removed as well as what has to remain. Also specify block name(s) where applicable. An image file is of no use. It must be a .dwg file. Hi Re Mark, I am attaching a portion from my drawing because of the size of file is very high. I have the blocks named 'EM' and 'WM' more than 1000 times in my drawing. My requirement is below. i need to work on the block "WM" which is an attribute block by color BLUE. I have to split the lines colored "GREEN", "YELLOW" and "CYAN" from the BLUE BOX, and the block wants remain with the BLUE box and WM text only. This means I don't need to delete the line from the block. i need the spitted lines which "GREEN,YELLOW and CYAN" remain on the drawing as a pline single objects. If this done, I can edit those lines individually from the drawing as per my requirement. I hope you got my points clearly. Remain with kind regards....:) TEST BLOCK.dwg Quote Link to comment Share on other sites More sharing options...
ronjonp Posted February 22, 2018 Share Posted February 22, 2018 (edited) Here's a quick one: (defun c:foo (/ o s) (if (tblobjname "block" "wm") (progn (if (setq s (ssget "_x" '((0 . "insert") (2 . "wm,`*U*")))) (foreach b (mapcar 'cadr (ssnamex s)) (cond ((= "WM" (vla-get-effectivename (setq o (vlax-ename->vla-object b)))) (foreach e (vlax-invoke o 'explode) (and (= 256 (vla-get-color e)) (vla-delete e))) ) ) ) ) (vlax-for b (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) "WM") (if (/= 256 (vla-get-color b)) (vla-delete b) ) ) (command "_.attsync" "name" "wm") ) ) (princ) ) (vl-load-com) Edited February 23, 2018 by ronjonp Quote Link to comment Share on other sites More sharing options...
isutheparambil Posted February 24, 2018 Author Share Posted February 24, 2018 Here's a quick one: (defun c:foo (/ o s) (if (tblobjname "block" "wm") (progn (if (setq s (ssget "_x" '((0 . "insert") (2 . "wm,`*U*")))) (foreach b (mapcar 'cadr (ssnamex s)) (cond ((= "WM" (vla-get-effectivename (setq o (vlax-ename->vla-object b)))) (foreach e (vlax-invoke o 'explode) (and (= 256 (vla-get-color e)) (vla-delete e))) ) ) ) ) (vlax-for b (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) "WM") (if (/= 256 (vla-get-color b)) (vla-delete b) ) ) (command "_.attsync" "name" "wm") ) ) (princ) ) (vl-load-com) Hi ronjonp, Its amazing.... I got the actual requirement for the current cad file with "WM" block. Anyway, This is only work for the "WM" block... correct? What we need to do to get a global lisp for all blocks? From the lisp, I understand that rename the block name and details from the lisp itself with a new name and details for a new requirement, is OK for any other file. If the lisp is for a general one is much better. Thank you for your valuable information. With Kind Regards....:D:D 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.