MCRoadkill Posted June 8, 2011 Share Posted June 8, 2011 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. 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. 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) 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 12, 2011 Share Posted June 12, 2011 Please post a drawing makes it easier to test. Quote Link to comment Share on other sites More sharing options...
MCRoadkill Posted June 12, 2011 Author Share Posted June 12, 2011 Ok, i'll create a sample next tuesday. (because of the holidays here, monday no work ) Quote Link to comment Share on other sites More sharing options...
MCRoadkill Posted June 15, 2011 Author Share Posted June 15, 2011 Here is a sample (a day late, sorry) cable_sample.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 19, 2011 Share Posted June 19, 2011 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. Quote Link to comment Share on other sites More sharing options...
MCRoadkill Posted June 19, 2011 Author Share Posted June 19, 2011 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 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted June 20, 2011 Share Posted June 20, 2011 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. 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.