Designer68 Posted December 13, 2021 Posted December 13, 2021 Hello Is there a way (lisp) to label lines. I want to draw multiple lines (buildings) and i need a label in the center of each line with the text Left or Right. Based on the location of the previous line. if possible starting clockwise and counter clockwise as well. Quote
SLW210 Posted December 13, 2021 Posted December 13, 2021 I have moved your thread to the AutoLISP, Visual LISP & DCL Forum. Please post in the correct forum. Quote
mhupp Posted December 13, 2021 Posted December 13, 2021 Its best to upload a sample drawing of what your looking to do. Quote
Designer68 Posted December 13, 2021 Author Posted December 13, 2021 This is the example. Start point and toen above ech line if i went left or right. The most drawings i have to make are counterclockwise. Quote
mhupp Posted December 13, 2021 Posted December 13, 2021 Made this for someone a couple of months ago. They would import a satellite photo and they wanted to pick the corners of the house. ;;----------------------------------------------------------------------------;; ;; L Shape House (defun C:LHouse (/ p1 p2 p3 p4 p5 p6) (setq p1 (getpoint "\nPick Point 1") p2 (getpoint "\nPick Point 2") p3 (getpoint "\nPick Point 3") p4 (getpoint "\nPick Point 4") p5 (getpoint "\nPick Point 5") ) (setq p6 (list (car p5) (cadr p1))) (setvar 'cmdecho 0) (command "_.pline" "_non" p1 "_non" p2 "_non" p3 "_non" p4 "_non" p5 "_non" p6 "_CL") (setvar 'cmdecho 1) (princ) ) Don't know about the L or R's 1 1 Quote
BIGAL Posted December 13, 2021 Posted December 13, 2021 If you draw a pline of picked points and close as normal, then get vertices/co-ordinates you can determine using say pt1 pt2 pt3 angle, is it L or R then label etc the last leg is like angle pt6 pt1 pt2 you should label leg 1-2 need time to think. 2 Quote
Designer68 Posted December 14, 2021 Author Posted December 14, 2021 (edited) 11 hours ago, mhupp said: 11 hours ago, mhupp said: Edited December 14, 2021 by Designer68 Quote
Designer68 Posted December 14, 2021 Author Posted December 14, 2021 (edited) Thanks for the lisp, i will look if it works for me. Jan Pieter Edited December 14, 2021 by Designer68 Quote
Designer68 Posted December 14, 2021 Author Posted December 14, 2021 9 hours ago, BIGAL said: If you draw a pline of picked points and close as normal, then get vertices/co-ordinates you can determine using say pt1 pt2 pt3 angle, is it L or R then label etc the last leg is like angle pt6 pt1 pt2 you should label leg 1-2 need time to think. Bigal, Pt 1 Pt2 needs no label, because it is from the startpoint. So the label starts between 2 and 3 Quote
SLW210 Posted December 14, 2021 Posted December 14, 2021 I have renamed your thread to "Label in the center of each line with the text". Please use descriptive titles. Quote
BIGAL Posted December 14, 2021 Posted December 14, 2021 There is better examples of this as many points as you want Close is supported but still need a enter to stop, busy today so sorry no code time. (defun c:plpts ( / pt) (setq pt (getpoint "\nStarting point of Pline : ")) (command-s "_.pline" pt) (while (getpoint "\nPick next pt Enter to stop") ) ) 1 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.