Jump to content

How to justify all text inside of a block to the right without the text retaining pos


ecustis

Recommended Posts

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 by ecustis
Autocad Version
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

I think I meant it how you first read it :D

 

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...