So, if from variable pts you get something like "<Selection set: 3121e>", that means the TEXT is inside the polygon, otherwise, you will get nil. Instead of (0 . "POINT") you need to use (0 . "TEXT").
This part I don't understand.
Hi @maahee,
You can first select that object using
(setq obj (car (entsel "\nSelect the object:"))) ;an example
Then you can read a X, Y values from closed polygon (if it's from polyline) using
(setq ptlist (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 10)) (entget obj))))
And at final, you can use
(setq pts (ssget "_WP" ptlist '((0 . "POINT")))
I hope you will find a right way to do that.
That's a good question.
It's not as easy as it might seem at first glance.
Although having a closed polyline makes the job easier. Just one thing should be clear: calculating the polygon's centroid isn't always effective. A more elaborate algorithm is needed.
@Steven P,
I think the @Mountain_XD want to draw a rectangle between two selected points in that way the rectangle will be drawn inside the yellow polylines (I think that is walls) at desired height (T) in total length between two selected points. I think I understand correctly based on drawing.
Use DATE instead of CDATE:
https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-CBB24068-1654-4753-BE2E-1D0CE9700411
DATE stores the date value as a Julian date, which simply counts the number of days which have elapsed from a given epoch - as such, you can easily subtract two integer Julian date values to calculate the number of elapsed days between two dates, e.g.:
(< 7 (- (getvar 'date) (atoi (getenv "TELNUMBERS"))))
(assuming you have changed TELNUMBERS to store the DATE value instead of CDATE)