pBe Posted August 30, 2017 Posted August 30, 2017 Both codes will need a check angle of block Agreed. ...one more help required, if u refer the attached image, the yellow circled region shows the manually aligned for showing it in readable anglet I am liking Bigals' approach more and more because you get to choose which annotation would go to the first position and the object can be either a BLOCK or MTEXT. FWIW I updated the code to here to address the "readable angle" issue. But keep in mind, there are factors to consider MTEXT | justification MTEXT | mirrored or rotated BLOCKS | Insertion point BLOCKS | mirrored or rotated Quote
Roy_043 Posted August 30, 2017 Posted August 30, 2017 Instead of realigning loose (m)text entities with an insert it would make more sense to switch to using an attributed block. Quote
pBe Posted August 30, 2017 Posted August 30, 2017 Instead of realigning loose (m)text entities with an insert it would make more sense to switch to using an attributed block. I concur, focus on automating the values instead of the position and alignment. Quote
amb2301 Posted August 30, 2017 Author Posted August 30, 2017 Agreed. I am liking Bigals' approach more and more because you get to choose which annotation would go to the first position and the object can be either a BLOCK or MTEXT. FWIW I updated the code to here to address the "readable angle" issue. But keep in mind, there are factors to consider MTEXT | justification MTEXT | mirrored or rotated BLOCKS | Insertion point BLOCKS | mirrored or rotated Hi pBe, Thanks you so much for your help again, i tried with your new code, but it resulted like text1 & text2 getting moved to start point of that block as shown in attached image(blue circled location), could you please look on that. Thanks Quote
OMEGA-ThundeR Posted August 30, 2017 Posted August 30, 2017 Instead of realigning loose (m)text entities with an insert it would make more sense to switch to using an attributed block. Although it was not the question i wonder why no-one suggested attribute text (or just putting the text in the block and later exploded it for editing ()). Unless the text that need aligning is allready filled out and is different in every situation i see no reason why you should try to fix something with a lisp that can be done in 2 minutes with a (dynamic) block. Something like this: block.dwg Quote
pBe Posted August 30, 2017 Posted August 30, 2017 ... i wonder why no-one suggested attribute text..... i see no reason why you should try to fix something with a lisp that can be done in 2 minutes with a (dynamic) block. I'm sure most of us here are aware of that option OMEGA-ThundeR that is why I agreed with Roy_043 [ post 22 / 23 ] and suggested to focus on automating the values on my previous post. But we are replying to the present issue here, trying to "fix" the current problem. If the OP agrees to use attributes then we focus on that. Quote
OMEGA-ThundeR Posted August 31, 2017 Posted August 31, 2017 I'm sure most of us here are aware of that option.. Well, most of us probably ain't the OP . Quote
amb2301 Posted September 14, 2017 Author Posted September 14, 2017 Agreed. I am liking Bigals' approach more and more because you get to choose which annotation would go to the first position and the object can be either a BLOCK or MTEXT. FWIW I updated the code to here to address the "readable angle" issue. But keep in mind, there are factors to consider MTEXT | justification MTEXT | mirrored or rotated BLOCKS | Insertion point BLOCKS | mirrored or rotated Thank you pBe for your reply....sorry for late reply from my side as i was in vacation........ i tried with your revised lisp(> ang (* 0.5 pi))) pi 0)), its now getting changed to readable angle, but the problem is texts(site anno & count anno) not getting aligned in proper position as shown in attached image(blue circled locations)....my requirement is like to be get aligned(as in green circled part).....also attached .dwg for your reference sample2.dwg Quote
BIGAL Posted September 15, 2017 Posted September 15, 2017 The problem is tied into an extra question is the text left or right orientated compared to the block ? I know in my code I used a fudge factor to position the text. Using the insertion point of the block, now need to look at the bounding box of the block, length of text characters and so on. Often a simple answer becomes a lot more involved. You may need more than 1 version of the code. Normally you keep the majority of it making a defun and then do the adjustments like L or R adding to it. The code supplied matched exactly your initial request so for me to start adding options it would be better to start again and write it to be more universal and work with any block and word lengths as a start. Sorry no code. Like the prior post an attributed block would be a simpler way to go maybe at least 2 versions a left and right. Can still attach the existing text to a new block very easy, diferent lisp. Quote
amb2301 Posted September 15, 2017 Author Posted September 15, 2017 Hi, Thanks for your reply, i accept your suggestions, but i am new to lisp, so could you please help me on this. Actually as you said, i am planning for two lisp, one for right orientation & another for left orientation. but i tried changing the values, its not happening, so could you please help me for the left orientation aligning lisp, i require it as mentioned earlier(aligned like green circled location) Quote
amb2301 Posted September 17, 2017 Author Posted September 17, 2017 Hi Friends, please help me .....as it is urgently required ......thanks in advance Quote
amb2301 Posted September 20, 2017 Author Posted September 20, 2017 The problem is tied into an extra question is the text left or right orientated compared to the block ? I know in my code I used a fudge factor to position the text. Using the insertion point of the block, now need to look at the bounding box of the block, length of text characters and so on. Often a simple answer becomes a lot more involved. You may need more than 1 version of the code. Normally you keep the majority of it making a defun and then do the adjustments like L or R adding to it. The code supplied matched exactly your initial request so for me to start adding options it would be better to start again and write it to be more universal and work with any block and word lengths as a start. Sorry no code. Like the prior post an attributed block would be a simpler way to go maybe at least 2 versions a left and right. Can still attach the existing text to a new block very easy, diferent lisp. Thank you so much Bigal for your Help......i tried as per suggestion its working fine now..............thank you so much for your help. Quote
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.