Originally Posted by
tim_newsome
I am reading what seems to be a conflicting statement telling me not to convert the standard autocad pen tables but it seems that you are saying you did that years ago too? ???
I understand what the named commands are.
So if my company is using acad.ctb the how do I make autocad read acad.stb? the convertpstyles dictates I convert the ctb file.
I've never actually changed or even used acad.ctb I opened acad.ctb and saved the file as as acad - Convert.ctb.
We use the Florida Dept of Transportation stb file and I have a macro to set FDOT.stb
Code:
^C^C^P(or C:FDOT255(load "FDOT255.lsp"));FDOT255
using this lisp:
Code:
; Set drawing settings to FDOT.stb
; (load "FDOT255.lsp") FDOT255
; ^P(or C:FDOT255(load "FDOT255.lsp"));FDOT255
(defun c:FDOT255 ()
(if(=(getvar "PStyleMode") 1)(command "_convertpstyles" "acad - Convert.stb"))
; (cond(=(getvar "DwgTitled")0)(alert "Drawing must be saved first!")(exit))
(vla-put-StyleSheet
(vla-get-ActiveLayout (vla-get-ActiveDocument (vlax-get-acad-object)))
"FDOT.stb"
)
(setq layers (vla-get-layers(vla-get-ActiveDocument (vlax-get-acad-object))))
(vlax-for l layers
(progn
(cond
((equal (vla-get-color l) 8)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 9)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 250)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 251)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 252)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 253)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 254)(setvar "CPLOTSTYLE" "125")(vla-put-plotstylename l "125"))
((equal (vla-get-color l) 255)(setvar "CPLOTSTYLE" "Normal")(vla-put-plotstylename l "Normal"))
(T(setvar "CPLOTSTYLE" "255")(vla-put-plotstylename l "255"))
)
)
)
(setvar "CPLOTSTYLE" "ByLayer")
(princ)
)
We get a lot of drawings from outside and as long as they're using Civil 3D standard template colors the drawings plot as expected after conversion.
HTH