CyberAngel Posted May 7 Posted May 7 We get survey points for water and sewer lines. In the record drawing, for selected COGO points, we would like to pull the station value for each point and incorporate it in the label style for the point. A colleague came up with a clunky sort of process: create an alignment offset label that coincides with the survey point, then pull the information from that label into the point label. I've been trying to find a way to combine those two steps, so that the point label automatically incorporates the station value. If your answer is "a LISP function," that's all you need to say, I can write LISP. I'm just hoping I overlooked a more direct solution. Quote
BIGAL Posted May 7 Posted May 7 Sounds like you need a point group, with a Cogo point providing you have a description you may be able to do something, you can get COGO points via SSGET. One of the vl properties should be description. Step 1 this is a COGO height pretty sure you want 'Description. ; BY AlanH cogo point height as a label 2014 ; (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) In CIV3D support directory there is sample code not on CIV3D at moment, it has a example of read XYZ points, its lisp code, inside that code is make a CIV3D group you should be able to pass it the point numbers in say a sequence. I do have somewhere read an alignment that may be what you want. Will try to find it again done for a specific task. If I remeber correct need to get "Alignments from the CIV3D database select the one you want and can then get properties like stations. 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.