3d Polyline with zero elevation - how to copy from z's of the blocks that have same x, y as the vertices?

3d Polyline with zero elevation - how to copy from z's of the blocks that have same x, y as the vertices?

pesctx
Participant Participant
518 Views
2 Replies
Message 1 of 3

3d Polyline with zero elevation - how to copy from z's of the blocks that have same x, y as the vertices?

pesctx
Participant
Participant

Hey!

I have a little situation.

I have a 3d Polyline and the vertices have the elevation 0 (zero).
At the same, in exact (each) position of every vertex, I have a block having the correct elevation.

How could I copy the elevation from the blocks to the vertices of the polylines?

0 Likes
519 Views
2 Replies
Replies (2)
Message 2 of 3

tramber
Advisor
Advisor

By hands you can browse the points of your object pleased to the Properties palette and change with your keyboard, the value of Z.

A manual solution for now.

tramber_0-1668520172397.png

 


EESignature

0 Likes
Message 3 of 3

Kent1Cooper
Consultant
Consultant

If there are not other things with Insertion points to confuse the issue, and if you are looking at the 3DPolyline flat in its plane with the Blocks appearing to be at the vertices in XY terms, and if there's a Block at every vertex, this [in simplest terms] seems to work:

(defun C:TEST (/ 3dpl n)
  (setq
    3dpl (car (entsel "\nSelect 3D Polyline: "))
    n -1
  )
  (command "_.pedit" 3dpl "_edit")
  (repeat (fix (vlax-curve-getEndParam 3dpl))
    (command
      "_move" (osnap (vlax-curve-getPointAtParam 3dpl (setq n (1+ n))) "_ins")
      "_next"
    )
  )
  (command "_exit" "")
  (prin1)
)
Kent Cooper, AIA
0 Likes