BIGAL Posted January 8, 2015 Share Posted January 8, 2015 Had a situation today where we needed to provide a plain dwg with the pt heights displayed as text, there does not appear to be a direct way to do this from within Civ3D, unlike triangles or contours. So a easy way just export the points as required PENZ etc to a CSV file, load into excel the csv and simply use the concatenate command to build a TEXT statement column. text pt ht ang text TEXT 123.45,456,76 0.25 45 123.456 Copy down all done I just copied the column to notepad saved as a pttext.scr and loaded as a script, bang all done 1500 pts. (tried copy column paste but did not work maybe to many lines) You can multi text so say get x,y and Z at different angles. A side question anyone Briscad and proxy objects viewing ? Quote Link to comment Share on other sites More sharing options...
Tyke Posted January 8, 2015 Share Posted January 8, 2015 What happens if you just export your drawing to dwg format? Normally everything is converted to vanilla AutoCAD objects. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 9, 2015 Author Share Posted January 9, 2015 Tyke Civ3d points are proxy objects and did exportoautocad with point heights on and the heights did not appear I hoped that would work also. Could do a lisp but it took 5 mins in excel may take 1/2 hour by by time debug etc for the once when ever. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted January 16, 2015 Author Share Posted January 16, 2015 (edited) Here is a VLISP to export multiple bits of info about a Civ3d point can be customised by user. ; change contours via a lisp used with toolbar ; By A Houston 2012 ; (defun pttext1 (/ appstr ) ;; Assign new style to selected Civil 3D surfaces ;; Required Subroutines: AT:ListSelect ;; by Alan J. Thompson, 06.22.10 (if ((lambda (vrsn) (cond ((vl-string-search "R17.2" vrsn) (setq appstr "6.0")) ;09 ((vl-string-search "R18.1" vrsn) (setq appstr "8.0")) ;11 ((vl-string-search "R18.2" vrsn) (setq appstr "9.0")) ;12 ((vl-string-search "R19.0" vrsn) (setq appstr "10.0")) ;13 ((vl-string-search "R19.1" vrsn)(setq appstr "11.0"));;2014 ((vl-string-search "R20.0" vrsn)(setq appstr "12.0"));;2015 ((alert "This version of C3D not supported!")) ) ; cond ) ; lambda (vlax-product-key) ) (progn (cond (*AeccDoc*) ((setq *AeccDoc* (vlax-get (cond (*AeccApp*) ((setq *AeccApp* (vla-getinterfaceobject (cond (*Acad*) ((setq *Acad* (vlax-get-acad-object))) ) (strcat "AeccXUiLand.AeccApplication." appstr) ) ) ) ) 'ActiveDocument ) ) ) ) ) ; cond ) ; If ) ; defun pttext1 (defun pttext2 ( / i lst) (vlax-for i (vlax-get *AeccDoc* 'Pointgroups) (setq lst (cons (cons (vla-get-name i) i) lst)) ) (setq Pgroup (car (AT:ListSelect "Set Point Group style" "Select Point group" 10 10 "false" (vl-sort (mapcar (function car) lst) '<) ) ) ) ) ; defun (defun pttext3 ( / k L m x y rot tht pgroup pts len) (vlax-for m (vlax-get *AeccDoc* 'Pointgroups) (If (= (vla-get-name m) Pgroup) ; add selection option back in (setq pts (vlax-get m 'Points)) ; pts is list of civ3dpts as pt number ) ; if ) ; vlax-for ; extract point properties (command "-Layer" "N" "Pthts" "S" "Pthts" "") (setvar "textstyle" "Standard") (setq rot (getreal "\nEnter rotation angle")) (setq tht (getreal "\nEnter text height")) (setq len (length pts)) (setq L 0) (repeat len (vlax-for K (vlax-get-property *AeccDoc* 'Points) (If (= (vlax-get k 'number) (nth L pts)) (progn (setq Ptnum (vlax-get k 'Number)) (setq ht (vlax-get k 'Elevation)) (setq y (vlax-get k 'Northing)) (setq x (vlax-get k 'Easting)) (setq desc (vlax-get k 'Description)) (setq fdesc (vlax-get k 'FullDescription)) ; do text bit here (command "Text" (strcat (rtos x 2 3)"," (rtos y 2 3)) tht rot (rtos ht 2 3)) ) ; progn ) ; if ) ; vlax-for (setq L (+ L 1)) ) ; repeat ) ; defun (pttext1) (pttext2) (pttext3) ;; List Select Dialog (Temp DCL list box selection, based on provided list) ;; title - list box title ;; label - label for list box ;; height - height of box ;; width - width of box ;; multi - selection method ["true": multiple, "false": single] ;; lst - list of strings to place in list box ;; Alan J. Thompson, 09.23.08 / 05.17.10 (rewrite) (defun AT:ListSelect (title label height width multi lst / fn fo d item f) (setq fo (open (setq fn (vl-filename-mktemp "" "" ".dcl")) "w")) (foreach x (list (strcat "list_select : dialog { label = \"" title "\"; spacer;") (strcat ": list_box { label = \"" label "\";" "key = \"lst\";") (strcat "allow_accept = true; height = " (vl-princ-to-string height) ";") (strcat "width = " (vl-princ-to-string width) ";") (strcat "multiple_select = " multi "; } spacer; ok_cancel; }") ) (write-line x fo) ) (close fo) (new_dialog "list_select" (setq d (load_dialog fn))) (start_list "lst") (mapcar (function add_list) lst) (end_list) (setq item (set_tile "lst" "0")) (action_tile "lst" "(setq item $value)") (setq f (start_dialog)) (unload_dialog d) (vl-file-delete fn) (if (= f 1) ((lambda (s / i s l) (while (setq i (vl-string-search " " s)) (setq l (cons (nth (atoi (substr s 1 i)) lst) l)) (setq s (substr s (+ 2 i))) ) (reverse (cons (nth (atoi s) lst) l)) ) item ) ) ) Edited January 16, 2015 by BIGAL p v's P Quote Link to comment Share on other sites More sharing options...
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.