Quick edit a style

Quick edit a style

ebarlevi
Advocate Advocate
627 Views
6 Replies
Message 1 of 7

Quick edit a style

ebarlevi
Advocate
Advocate

Hi,

Is there a quick way to access a style within a set ?

For example "standard" within "settings"  General>multipurpose styles>Code Set styles.

Thanks

0 Likes
628 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

Hi ebarlevi,

 

You can access the 'Code Set styles' using Civil 3D .NET API -
civilDoc.Styles.CodeSetStyles

 

and the civilDoc is CivilDocument object -

 

CivilDocument civilDoc = CivilApplication.ActiveDocument;


Does it help ?

 

Thanks,

0 Likes
Message 3 of 7

ebarlevi
Advocate
Advocate
Hi, Thank you for the replay. Unfortunately, I am not an experience programmer (although I know my way around vlisp). Therefore I could not use that solution. But, I thank you again for your effort. Eitan
0 Likes
Message 4 of 7

Jeff_M
Consultant
Consultant

Could you explain what it is you want to do and how you want to do it? Remember, the more clear your question, the better the responses will be.

Jeff_M, also a frequent Swamper
EESignature
0 Likes
Message 5 of 7

Anonymous
Not applicable

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 )

 

0 Likes
Message 6 of 7

brianchapmandesign
Collaborator
Collaborator

I think his question was clear... though I don't know the answer.

 

Simply wants to know can you open the settings->general->code set styles->style

 

through a command or something quick


"Very funny, Scotty. Now beam down my clothes.
0 Likes
Message 7 of 7

Anonymous
Not applicable

What I posted was a 1 button click to change styles here is the toolbar showing the contour picks. The black sq is off the triangle is exactly that.

 

ScreenShot009.jpg

0 Likes