ecustis Posted May 17, 2013 Share Posted May 17, 2013 (edited) Hey everyone, I've been reading the forum for a while but just decided to sign up because I have been at this problems for countless hours. I am trying to align all of the text inside of a block and have it actually align the text instead of having it keep it original position (like when you use "Justifytext" command). For example: We use blocks for fire alarm devices that we insert into drawings. When the devices are inserted they look like this (Middle left): 15CD TBD TBD 1/4W I can double click each line of these texts, have the eattedit window pop up, go to "text options" tab, click the drop down menu for "Justification:" and then choose my justification(middle right); then the text will actually move to align itself with my justification, causing my text to end up like this: 15CD ..TBD (Roughly like this, only perfectly straight vertically on the right hand side) ..TBD (ignore the dots, i had to insert them for the spacing to be correct for 1/4W this example) When I type "Justifytext", select my block, choose my justification (Middle right), just the snap point moves to that justification without the text actually moving at all, causing my text to end up like this: 15CD TBD TBD 1/4W To save tons of time for myself and my co-workers, is there anyone who has created a lisp file command to quickly do this, or know any one trick pony tactics to overcome this? Any help is greatly appreciated! Thank you! **Edit, this is Autocad version 2011 Edited May 17, 2013 by ecustis Autocad Version Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 17, 2013 Share Posted May 17, 2013 your best option is to redefine the block. 2011 has the BEDIT block editor so open your block with that. Highlight your attributes and change their justification using the properties palette. Save and exit the editor. when you are back in your drawing type ATTSYNC and select one of your blocks. Job done. Quote Link to comment Share on other sites More sharing options...
ecustis Posted May 17, 2013 Author Share Posted May 17, 2013 That won't work because I don't want to edit the block for it to be permanent. I'm only changing some of the blocks text attributes to justify middle right. :/ I appreciate the help though! Quote Link to comment Share on other sites More sharing options...
neophoible Posted May 17, 2013 Share Posted May 17, 2013 How about attaching your block for trial purposes? You can also show what you have and what you want in a DWG using said block. Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 17, 2013 Share Posted May 17, 2013 If you only want SOME blocks of a block definition I think you are stuck with individually modifying them or getting a program written (look on Lee Mac's site as he probably has something already written). If you are having to do that why not have one block type for left justified and another block for right justified. At least that way if somebody does ATTSYNC your block they won't all become left justified again which they will if you modify some of them by hand or program. Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 18, 2013 Share Posted May 18, 2013 Thinking about this a bit more I think with the risk of somebody ATTSYNCing the block at some time in the future your only way forwards with no inherant risks is to make different block. Any manual or programmatic modification to a limited set of blocks could be undone accidentally in the future. It may be possible to have a routine automatically rename a block while it converts it but that is beyond me. Quote Link to comment Share on other sites More sharing options...
neophoible Posted May 19, 2013 Share Posted May 19, 2013 Thinking about this a bit more I think with the risk of somebody ATTSYNCing the block at some time in the future your only way forwards with no inherant risks is to make different block. Any manual or programmatic modification to a limited set of blocks could be undone accidentally in the future. It may be possible to have a routine automatically rename a block while it converts it but that is beyond me. Well, now you've got me curious, Dave. I had interpreted your previous post to mean this, that is, that there should be two different blocks. Now it sounds like you meant something different when you said "...block type...". Should I pry further into what you meant originally? Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 19, 2013 Share Posted May 19, 2013 I think I meant it how you first read it you can have many block definitions in a drawing and each definition can be inserted many times but in general ALL blocks will be identical to their definition. One notable exception to this is with attributes. It is possible to delete or move attributes within their definition which will only affect futrue insertions of that block. This is where we get all those questions about blocks with odd behaviour. The way around that is to ENSURE you ATTSYNC your block whenever you modify attributes. I should at this point mention dynamic blocks. Here we have one definition but each instane can appear very different. This is achieved by adding parameters, to alter sizes, positions and even appearance. However they are still all based on one definition. This would be the ideal approach to the above problem. Using a visibility parameter you can allow either the left justified or the right justified attributes to show. Unfortunately - this is perfect with text but I have had limited (read no) success using attributes with visibility parameters. They just don't play well together. To be fair, I havn't yet checked with 2013 but that wouldn't help the OP anyway. Quote Link to comment Share on other sites More sharing options...
neophoible Posted May 19, 2013 Share Posted May 19, 2013 Thanks, Dave. I think a lot of people could benefit from that explanation/clarification. It looks like the sort of thing that ought to have a bit of prominence. Or is there already such posted somewhere that people somehow manage to miss? Quote Link to comment Share on other sites More sharing options...
dbroada Posted May 20, 2013 Share Posted May 20, 2013 I'm not sure. I have posted what I have learned from the days when AutoCAD came with manuals, discussions around the office and bits picked up here. I find blocks one of the most useful & versatile features of AutoCAD provided you pay attention. However the number of questions asked on here that seem quite self evident to me suggests that they are not as understood as I expect. I think it is really a question of sitting down in front of AutoCAD and seeing what happens when you redefine blocks and especially when you have blocks within blocks. When you undestand that try adding ATTRIBUTES (try? this part is simple) and see what heppens if you modify blocks with attributes and check the differences after ATTSYNCing the block. 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.