Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Switch Between CTB & STB Styles

12 REPLIES 12
Reply
Message 1 of 13
Anonymous
9733 Views, 12 Replies

Switch Between CTB & STB Styles

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.

 

 

12 REPLIES 12
Message 2 of 13
pendean
in reply to: Anonymous

CONVERTPSTYLES for jump between them in a file.
Message 3 of 13
Anonymous
in reply to: pendean

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?

Message 4 of 13
nestly2
in reply to: Anonymous

I believe when going from CTB to STB, you have to use CONVERTCTB before CONVERTPSTYLES

Message 5 of 13
Anonymous
in reply to: nestly2

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.

 

Message 6 of 13
pendean
in reply to: Anonymous

CONVERTPSTYLES is the command that's been around since R2000: going from CTB to STB you must have an STB ready to be used and assign.

Or save your self a lot of setup grief: open your STB-preferred template file, insert your problem file into it and move on 🙂
Message 7 of 13
dgorsman
in reply to: pendean

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.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 8 of 13
Anonymous
in reply to: dgorsman

Try setting PSTYLEPOLICY to 0

Message 9 of 13
alexisclouse2011
in reply to: Anonymous

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!

Message 10 of 13
Anonymous
in reply to: Anonymous

Does anyone have a solution for this because non of these resolve the issue of the mapping.

 

Message 11 of 13
TomBeauford
in reply to: Anonymous

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.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 12 of 13
Stephanie_Organ
in reply to: Anonymous

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.

Message 13 of 13
TomBeauford
in reply to: Anonymous

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)
 )

 

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report