Jump to content

Block text justification button


MCRoadkill

Recommended Posts

Hi Guys, (yes i'm new :))

 

I've been reading your forum for a while now and today i signed up, now that i have a question i can't solve by myself.

 

I'm in glassfibre infrastructure engineering, we use citymaps and draw glassfibre lines on them to engineering the whole "Fibre-to-the-Home" structure for cities.

 

We have a tool that reads how many lines are over each other and then dumps a series of text lines on screen that tells wich cables are on that spot.

 

justification_01.png

 

Standard the text is jusitified "Left", but once in a while you need to justify it to the right. You can easily do this by double clicking the text and it opens "EATTEDIT" from where you go to the tab "Text option" and select "Right" from the "Justification" field. This re-aligns the text to the following.

 

justification_02.png

justification_03.png

justification_04.png

 

As you can see in the example when you have more than one line of text to do, the procedure is kinda tedious, so i want to make a button on a toolbar that lets you select the textlines and then Justifies it from left to right.

 

So i tried using the command "JUSTIFYTEXT". Select the objects, select option "Right" and it moves the insert point from left to right but it doesn't re-align the text. (as you can see in the screenshots below)

 

justification_05.png

justification_06.png

 

Tried doing it with a recorded action macro but that didn't work.

 

Can anyone help me with this, how to make a button/command that does this for me. Let me select one or multiple text objects and then does what is shown in the first series of screenshots.

Link to comment
Share on other sites

Not at work right now you need a fudge factor the distance from line to text x 2 and move text at the text angle rather than pick line etc its easier to hardcode.

 

So move text then rejustify.

 

Will have a go if I can tomorrow.

Link to comment
Share on other sites

Ok.

 

First off i'm still wondering why there is a difference in justification actions.

If i double click it and go to text options, click the pulldown menu of justification, select right(or left) click ok, then the text line re-aligns itself. While if u use the justifytext command and select right (or left) only the insert point is moved.

 

Eventually i need something to re-align multiple text lines at once and not double click each and everyone of them....wich takes a very long time, since you've a lot of them to do...

 

Thanks :)

Link to comment
Share on other sites

First step is to find a adjust block text lisp adding the move bit is easy its just reading the angle of the block and adding or subtracting a move amount depending on text justification. Had a quick look around and lee mac's great routines almost do it for you. Ask him nicely to maybe look at his AttmodsuiteV1 to also do a displacement based on the existing rotation angle.

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...