Alexw89 Posted July 28, 2016 Share Posted July 28, 2016 Good Morning Folks! I trust you are all well? I apologise in advance if this is not posted correctly. I'm new to this forum as I signed up for some assistance on a particular thought I'm having and would be grateful for your help. I've been working for a House Builder for about 4 years now and have come to use a wealth of Lee Mac's Lisp functions (I can't stress how much they've helped me, such a help!) as there is tendency to have a lot of repetition including Titleblocks being renamed with standard house types. What I'm looking for is whether there might be a way of editing titleblocks and deleting layouts outside of a drawing (possibly like a dialog box or similar?). It would cut the amount of time substantially spent changing titleblocks. I'm open to learning some code unless people have already encountered similar ideas I would appreciate the help! Many Thanks Alex W Quote Link to comment Share on other sites More sharing options...
tombu Posted July 28, 2016 Share Posted July 28, 2016 Why do you need to keep changing title blocks? There may be a simple solution to what you're wanting to accomplish. You can always use a different title block in either a new layout or a new drawing using the other as an xref. Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 28, 2016 Author Share Posted July 28, 2016 Hi Tombu. Thanks for the prompt response! The reason being is we have a set of core standard house type drawings that are then Xref'd into individual site folders. These are then honed down by deleting the layout tabs that aren't applicable and then the titleblock is amended to show the specific site address. If you have any particular ideas I would be open to any suggestions? Also if you want I could send a layout to give you a better idea as to what I'm trying to achieve. Thanks Alex W Quote Link to comment Share on other sites More sharing options...
tombu Posted July 28, 2016 Share Posted July 28, 2016 Is that specific site address stored in a title block attribute? Is it different for each layout? Can you attach a small example with the site address you want changed with the new address? I like to reference custom drawing properties as they're easy to modify, you can use reference Sheet Set variables as well. Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 28, 2016 Author Share Posted July 28, 2016 The site address at the moment is individually typed into each titleblock as an attribute. And for each layout in the site folder, it is exactly the same. TEMPLATE BS2.dwg Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 28, 2016 Author Share Posted July 28, 2016 Has that worked what I've sent through? Quote Link to comment Share on other sites More sharing options...
tombu Posted July 28, 2016 Share Posted July 28, 2016 Simplest would be to name the drawings with the address and use a field (%%) with the "Filename only" and with "Display file extension" unchecked in the attribute. Then you would never need to modify the attribute again. There are lisp routines to modify the attribute using the block and tag names, but you would need to provide the specific site address for each drawing. Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 28, 2016 Author Share Posted July 28, 2016 Cheers that's something to work with definitely! Could this be linked to something like a text or excel sheet to ensure both lines of text for the address Quote Link to comment Share on other sites More sharing options...
tombu Posted July 28, 2016 Share Posted July 28, 2016 Cheers that something to work definitely! Could this be linked to something like a text or excel sheet to ensure both lines of text for the address It could be done with lisp, are you talking about one sheet for each drawing or referencing two specific lines from one sheet for all drawings? Would this be easier than modifying the attribute? Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 28, 2016 Author Share Posted July 28, 2016 Two specific lines from one sheet for all drawings in one particular folder. If that makes any sense! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 29, 2016 Share Posted July 29, 2016 To just change a title block details in as many layouts as you want is pretty easy, have a look at this. Issued for construction.lsp Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted July 29, 2016 Author Share Posted July 29, 2016 Thanks Bigal, what's the command to initiate it? Many Thanks Alex W Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 29, 2016 Share Posted July 29, 2016 You just appload it or in our case pick from a pull down menu. Note its an example you will need to customise for your exact block name and attribute tag names. I ahve a few others that do the same thing bottom line is find a block in a layout tab and change certain attributes using tag name. Again an example of setting up multiple tags to change. (setq oldtag1 "SHT_NO") ;attribute tag name (setq oldtag2 "DRG_NO") ;attribute tag name (setq oldtag3 "PROJ_NO") ;attribute tag name (setq newstr3 "2010026") (setq oldtag4 "REV_NO") ;attribute tag name (setq newstr4 "PA") (setq oldtag5 "PROJECT_DESCRIPTION") ;attribute tag name (setq newstr5 "SEALING OF ROADS") (setq oldtag6 "PROJECT_TITLE") ;attribute tag name (setq newstr6 "NORTH EAST ") (setq oldtag7 "DIRECTORY") ;attribute tag name (setq newstr7 "MELWAYS") (setq oldtag8 "MAP_REF") ;attribute tag name (setq newstr8 "444&445") ; then (foreach att (vlax-invoke (vlax-ename->vla-object (ssname SS1 0 )) 'getattributes) (if (= oldtag1 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr1) ) ; end if (if (= oldtag2 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr2) ) ; end if (if (= oldtag3 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr3) ) ; end if (if (= oldtag4 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr4) ) ; end if (if (= oldtag5 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr5) ) ; end if (if (= oldtag6 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr6) ) ; end if (if (= oldtag7 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr7) ) ; end if (if (= oldtag8 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr8) ) ; end if (if (= oldtag14 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr14) ) (if (= oldtag15 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr15) ) (if (= oldtag16 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr16) ) (if (= oldtag18 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr18) ) (if (= oldtag19 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr19) ) (if (= oldtag20 (strcase (vla-get-tagstring att))) (vla-put-textstring att newstr20) ) Quote Link to comment Share on other sites More sharing options...
Alexw89 Posted August 11, 2016 Author Share Posted August 11, 2016 Hi Bigal!Thanks very much for your assistance in this, apologies for not getting back to you sooner (I've been away for a couple of weeks on holiday in the South of France), I appreciate the help and just wanted to thank you for what you've sent through, I'll be giving that a go! Alex Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 12, 2016 Share Posted August 12, 2016 Post again if you have problems a sample dwg helps. 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.