NV Surveyor Posted July 29, 2024 Posted July 29, 2024 Hey everyone, I'm curious to know if anyone can assist with producing a lisp that will allow a user to click on a cogo point in a drawing, then copy the elevation from the cogo point and then click on a PL and assign the copied elevation from the cogo point to the selected PL. Thanks. Quote
BIGAL Posted July 29, 2024 Posted July 29, 2024 This is read a cogo point example, you could then assign the elevation property to that value. ; get X Y Z of a cogo point ; By AlanH (defun CIV3DPTHT ( / obj oldtext oldlay xyz pt1 ht pt) (alert "Pick CIV3D points press ESC or pick nothing to exit") (while (setq obj (vlax-ename->vla-object (car (entsel)))) ; vl 3d point convert to plain lisp (setq pt1 (vlax-safearray->list (vlax-variant-value (vlax-get-property obj "Location")))) (setq ht (rtos (nth 2 pt1) 2 3)) ; Z val (setq pt (list (nth 0 pt1)(nth 1 pt1))) ; XY (setq oldtext (getvar "textstyle")) (setq oldlay (getvar "clayer")) (command "Layer" "n" "Pointhts" "c" 1 "Pointhts" "s" "pointhts" "") ; put text on new layer ; 2.5 annotative text (if (setvar "textstyle" "ISO2.5") (command "TEXT" pt 0 ht) (alert (strcat "The style ISO2.5 annotative does not exists" "\nplease create and run again")) ) (setvar "textstyle" oldtext) (setvar "clayer" oldlay) ) ; end while (princ) ) ; end defun (CIV3DPTHT) So you want to make a 3dpolyline picking multiple points is that correct ? Quote
Isaac26a Posted August 4, 2024 Posted August 4, 2024 I think you haven't searched for enough solutions but I think this just fits your problem, I tested it and it also works for COGO points. 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.