castagnaccio Posted December 17, 2013 Posted December 17, 2013 Hello, I'm wondering if there is a method to snap a text object to order to place it automatically parallel (therefore rotate) to the line on the left. please see attachment Thank you in advance Quote
ReMark Posted December 17, 2013 Posted December 17, 2013 (edited) Try Lee Mac's Dynamic Text Alignment program. It has the option to align text to an object. http://lee-mac.com/dynamictextalignment.html Skip to post #6 for another lisp routine also written by Lee Mac. Edited December 17, 2013 by ReMark Quote
castagnaccio Posted December 17, 2013 Author Posted December 17, 2013 Thank you for the replay. I tried to run the lisp but autocad says: "Incorrect function: ACET-SYS-SHIFT-DOWN" Quote
ReMark Posted December 17, 2013 Posted December 17, 2013 Hmmm.......guess I should have tested it myself first. I think I might have mislead you. Sorry. I'll see what I can do to correct that mistake. One option (not the best in my opinion but it is a start) can be found here. http://www.cad-notes.com/text-alignment-technique/ I'll keep looking. Second option. Click on the link that follows. At the next webpage read about the free shared lisp program as described by linhoreka. Click on the word DOWNLOAD. Note that the lisp routine actually contains to programs. The one you want to test is invoked by typing ALT at the command line. Let me know what you think. http://www.cadeverything.com/help/showthread.php/7920-Free-shared-lisp-align-any-annotationTexts-on-lines-arcs-and-polylines Quote
eldon Posted December 17, 2013 Posted December 17, 2013 If you have Polar Tracking on and it is set to Relative to last segment, then when you Rotate the text and snap (with Osnap Endpoint, Near, of Midpoint) to the line when specifying base point, the text will align itself to the line and also the Ortho points to the line when you drag it around. You may have to move the text slightly at the end. This is a built-in property so no lisp is needed. Quote
ReMark Posted December 17, 2013 Posted December 17, 2013 Third option, the one I would recommend, and it works on MText or DText to any Curve Object (Arc/Line/Polyline/Spline/Circle/Ellipse etc...). And guess what? It too was written by Lee Mac. I just didn't see it apparently. Find it here... http://www.lee-mac.com/dtcurve.html Read about the five options available too. I think you'll like this one. Quote
nestly Posted December 17, 2013 Posted December 17, 2013 For frequent use, one of the provided lisps would probably be best, but for infrequent use, Parallel and Perpendicular OSnaps might suffice. Quote
eldon Posted December 17, 2013 Posted December 17, 2013 If you pick the rotation base point on the line itself, instead of at the insertion point of the text, then with Polar tracking, the angle of the line is picked up without any further snapping - one less Osnap to use. Quote
castagnaccio Posted December 17, 2013 Author Posted December 17, 2013 ReMark: thank you for your replay. That lisp doesn't work, the text does not get aligned. I think that the problem is that the orientation of the starting mtext is not 0 degree! eldon: thank you for your replay. The problem is that I don't draw the line before placing the mtext.. nestly: thank you for your replay. Your solution does work but only when the starting mtext is at 0 or 180 degree (perpendicular) or 90 or 270 degree (parallel). The starting orientation of the mtext is not 0 or 90 or 180 or 270 degree but random. Other ideas? Quote
eldon Posted December 17, 2013 Posted December 17, 2013 From the wording of your first post, one would assume that the line was there first. I find it easier to write the text first and then rotate it to align with an existing line. You could always set up a UCS parallel to the line, and then any text would align with the line. Quote
castagnaccio Posted December 17, 2013 Author Posted December 17, 2013 yes, the line is there first but I drew the lines all together and then I started to place all the text objects. The text objects were oriented not 0, 90, 180 or 270 deg. because I just copied a text object that was already aligned to a line. "I find it easier to write the text first and then rotate it to align with an existing line." Yes again, next time I will do the same . I solved this issue by selecting all the text objects at the same time and then setting the orientation to 0 degrees. After that I used the method suggested by nestly. I'm wondering if there is a method on how to point snap on a line that is parallel to the object it self, in this way I wouldn't need to rotate all to objects to 0 deg. Quote
castagnaccio Posted December 18, 2013 Author Posted December 18, 2013 I'll have a look at it thank you Quote
easymike29 Posted December 18, 2013 Posted December 18, 2013 . This works in autocad12 for DOS. TXTALIGN.LSP Quote
castagnaccio Posted December 18, 2013 Author Posted December 18, 2013 Try this trio of routines: [ATTACH]45783[/ATTACH] works perfectly thanks Quote
castagnaccio Posted December 18, 2013 Author Posted December 18, 2013 .This works in autocad12 for DOS. thank you, but I have only autocad 2010.. Quote
Spaj Posted December 19, 2013 Posted December 19, 2013 (edited) You're welcome... thank you, but I have only autocad 2010.. He's talking AutoCAD 12 for DOS from the 80's (not AutoCAD 2012) Edited December 19, 2013 by Spaj Quote
MSasu Posted December 19, 2013 Posted December 19, 2013 I tried to run the lisp but autocad says:"Incorrect function: ACET-SYS-SHIFT-DOWN" This means that you don't have Express Tool extension installed. Quote
ReMark Posted December 19, 2013 Posted December 19, 2013 ReMark: thank you for your replay. That lisp doesn't work, the text does not get aligned. I think that the problem is that the orientation of the starting mtext is not 0 degree! Which routine are you referring to? The lisp routine I mention in post #6 works with MText as I just tested it. In my test drawing I had four lines of MText that were created with a rotation angle of 15 degrees and a single line that was drawn at an angle of 52.5 degrees. Quote
ReMark Posted December 19, 2013 Posted December 19, 2013 Aligned text test. Pay attention to the options Lee has so kindly provided as one of them is required to achieve the final result. Reference: Link to lisp routine in post #6. 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.