point on the lines

point on the lines

Anonymous
Not applicable
833 Views
3 Replies
Message 1 of 4

point on the lines

Anonymous
Not applicable

I get some help. atteched jpg file. there are many lines. I need pick point on the lines

what do I edit these sentence.

(setq e (entget ss))
(setq ang (angle (setq x1 (cdr (assoc 10 e))) (setq x2 (cdr (assoc 11 e)))))
(_point (mapcar (function (lambda (j k) (/ (+ j k) 2.))) x1 x2) ang )

 

atteched file.

0 Likes
834 Views
3 Replies
Replies (3)
Message 2 of 4

john.uhden
Mentor
Mentor

It appears that you may be looking for the midpoint of each line of a selection set.  Is that right?

Do you want to create a list of midpoints as in one for each line in the selection set?

Might the selection set contain entity types other than lines?

 

It always helps if you can explain the entire goal.

John F. Uhden

0 Likes
Message 3 of 4

Anonymous
Not applicable
thank you. have a good day
there are points upper the midpoint of lines
multi selected.
0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

@Anonymous wrote:
.... there are points upper the midpoint of lines   multi selected.

I may not understand correctly, either, but to clarify, I have some questions based on the direction of the arrow in the image:

 

Do you want to select Point objects that are already drawn on Lines, and have them moved to above the Lines on which they lie?  If so:

 

1)  What defines how far above the Line each Point should be moved?

 

2)  They look like they're at the midpoints of the Lines, but maybe they're only close to that -- should they be moved the appropriate distance off the Line from wherever they are, or to some position such as above the midpoint even if they are not originally on the midpoint?

 

3)  If "upper" means above the Lines, and the Points are to be moved that way, would it be straight up, or in the more upward direction perpendicular to each Line?

 

Or do you want to select the Lines, without any Points already drawn, and add a Point above each Line?  [Same questions as above about distance and position.]

 

And some comments on Post 1:

The variable name 'ss' is often used for a selection set, from User selection.  If that's what you mean by it, and it contains the multiple objects mentioned [whether those are Lines or Points], you can't use (entget) on a selection set -- it requires an individual entity.

 

The last line of code there looks like you have a (_point) function defined.  If so, can you post the code for it?  Or are you trying to use a POINT command there to draw Point objects?

Kent Cooper, AIA
0 Likes