S_ARELLANO Posted January 27, 2021 Posted January 27, 2021 (edited) Hi everyone, today i would to ask for your help with a way to label a group of selected Polyline/Lines at the middle of each segment in the case of the polylines or at the middle of the line. I pretty much have the basic idea of how to make the LISP but, being honest, i don't have any idea of how to write the code needed. Basically, the steps i do when labeling manually my PLines is: First, i choose my custom text style named SS_BSligth, then i select middle bottom justification and select the middle point of the PLine segment i'm working with, then i write the heigth of the text by multypling 2.5 times the scale i'm working with and dividng by a thousand (i.e. if i'm working on a 1:100 scale, i use a text height of 2.5 x 100 / 1000 = 0.25 pts.), then i write down the length of my line and some other parameters that i fill up later on, using a format of 20.00-X.XX-20 where, 20.00 is the length of the segment and -X.XX-20 are the values that i fill up later. After having all of this, i proceed to move the text i just created upwards by a certain amount of points based on the polyline width (i.e. if the PLine width is 0.75 i move the text upwards by 0.60/2+0.10 = 0.40), then i rotate the text with the base point at the middle of the segment line, and then i rotate the text so it aligns to the segment of the PLine. IDK if this is actually possible, i guess it is but i don't really have any idea of LISP to make it bymyself, that's why i'm writing this thread looking for help of you guys. PS. I'm adding an image for reference, as well as the sample DWG. Also, i think it's convenient to say that i work with Mertical Units. Many thanks in advance. Cheers sample.dwg Edited January 27, 2021 by S_ARELLANO Quote
pBe Posted January 27, 2021 Posted January 27, 2021 (edited) (defun c:lapel ( / p1 p2) (while (and (or p1 (setq p1 (getpoint "\nStart Point"))) (setq p2 (getpoint p1 "\nNext Point")) ) (......) ) (princ) ) put lapel in teh midble of segmnet yes? f8rgiv3 my dyslexia... Edited January 27, 2021 by pBe Quote
BIGAL Posted January 28, 2021 Posted January 28, 2021 Over at forums/autodesk pretty sure Kent Cooper has a label pline routine, I think it has various options. A Google should find. 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.