It is possible to change styles for contours and points without using the normal toolspace method, I have the contours as tool bar options blank 0.5 1.0 2.5 etc its all written in lisp. It uses a dialog where you have more than one surface or point group . Most of our road jobs only have 1 surface so the toolbar works so easy for on/off
;(defun c:Surface (/ appstr lst )
;; Assign new style to selected Civil 3D surfaces ;; Required Subroutines: AT:ListSelect ;; Alan J. Thompson, 06.22.10 ;; Modified by Alan H Jan 2011
(vl-load-com)
(ah:vercheck) ; version check see vercheck.lsp (vlax-for j (vlax-get *AeccDoc* 'SurfaceS) (setq lst (cons (cons (vla-get-name j) j) lst)) )
;if length of surfaces more than 1 else skip pick if 0 then msg and exit (setq lenlst (length lst))
(if (= lenlst 0) (progn (Getstring "\nYou have no surfaces press any key to exit") (exit) ) )
(if (= lenlst 1) (setq surfacepick (car (nth 0 lst))) ; pull surface out of dotted pair )
(if (> lenlst 1) (progn (setq surfacepick (car (AT:ListSelect "Set new surface " "Select surface name" 10 10 "false" (vl-sort (mapcar (function car) lst) '<) ))) ) ; end progn ) ;end if
(setq lst2 lst) ; make answer returned list2
(setq lst '())
(vlax-for i (vlax-get *AeccDoc* 'SurfaceStyles) (setq lst (cons (cons (vla-get-name i) i) lst)) )
(if (and lst (setq surface (car (AT:ListSelect "Set new surface style" "Select style" 10 10 "false" (vl-sort (mapcar (function car) lst) '<) ) ) ) ) (progn (vlax-for k (vlax-get *AeccDoc* 'SurfaceS)
(if (= Surfacepick (vla-get-name k)) ;match surface (vlax-put k 'Style (cdr (assoc surface lst))) ) ; end if ) ; end vlax-for ) ; end progn ) ; end if
(setq lst '())
(setq surfacepick nil surface nil lenlst nil)
(princ) ; exit quietly ;end of surface defun )
;; Input Dialog box with variable title ;; By Ah June 2012 ;; code (ah:getval title)
(defun AH:Getval (title width limit / fo) (setq fname "C://acadtemp//getval.dcl") (setq fo (open fname "w")) (write-line "ddgetval : dialog {" fo) (write-line " : row {" fo) (write-line ": edit_box {" fo) (write-line (strcat " key = " (chr 34) "sizze" (chr 34) ";") fo) (write-line (strcat " label = " (chr 34) title (chr 34) ";" ) fo) ; these can be replaced with shorter value etc ;(write-line " edit_width = 18;" fo) ;(write-line " edit_limit = 15;" fo) (write-line width fo) (write-line limit fo) (write-line " is_enabled = true;" fo) (write-line " }" fo) (write-line " }" fo) (write-line "ok_cancel;}" fo) (close fo)
(setq dcl_id (load_dialog "c:\\acadtemp\\getval")) (if (not (new_dialog "ddgetval" dcl_id)) (exit)) (action_tile "sizze" "(setq item $value)(done_dialog)") (mode_tile "sizze" 3) (start_dialog) ; returns the value of item )