I had the command but have lost it.
I normally use CTB styles but I wish to switch back to STB for this job I'm on and I'm having difficulty finding the proper command.
I thought that was the proper command but when I use it a file window opens and it says I need to select an STB plot style.
(Currently I'm in CTB mode.)
Once I make a selection it then gives me an error message stating:
"That style does not contain a color mapping table and cannot be used. Select another plot style."
I don't remember seeing this before, I remember that it would just switch between the 2 plotstyles.
Do you have any idea what is going on here?
CONVERTCTB has me selecting a CTB style from a file window and then it opens the STB style window and wants me to create a new STB style with the name of the CTB style I selected. That's a long one, I hope everyone can follow that.
I don't think this is what I want.
I just want to switch back to the standard STB plot styles from ACAD.
More precisely there must be an STB with a mapping table that coordinates the colors to the styles (just like the message says). Not all STB files have this. Once CONVERTCTB has been used to create the appropriate STB file with the mapping that STB can be re-used in future calls to CONVERTPSTYLES, and the STB file for the drawing can be switched to something more appropriate after the command call.
If CONVERTPSTYLES wasn't complaining about the lack of mapping information before, then the STB file being switched to already had those settings.
I'm having the same issue. I have a template that has a lot of other settings and styles that I want to use, but it was setup for a .ctb. Now I have the .stb created and ready to use, but I can't figure out how to choose it!
Reality is there's no magic button. If you convert an STB drawing with hundreds of layers & objects assigned to Plot Styles to a CTB which doesn't allow Plot Styles they will be lost. Even trying to convert a drawing from one STB to another STB with different Plot Style names can be challenging as AutoCAD's has 9 shades of grey while the one we use only has 3.
I love using our STB but if I get an outside drawing with it's CTB or STB included that's what I'm going to use to look at it.
I have had the same issues with the missing colour mapping table when trying to convert from .CTB to .STB.
The solution for this is to first use the CONVERTCTB command, and select an existing .CTB plotstyle file. You will then be prompted to save this as a .STB file.
This should give you the colour mapping necessary to now use your desired .STB plot style.
Safest bet is to start with a template file that's already set up to use whatever STB or CTB file you want to use!
I have a lisp to convert a drawing with the standard Civil 3D layers from an old CTB we used years ago to the STB we use now by assigning the STB Plot Style names to layers after switching to STB. While it's written specifically for the STB we use it could be modified to set the plot style names to layers for a different template and STB file.
; 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)
)
Can't find what you're looking for? Ask the community or share your knowledge.