See the top rated post in this thread. Click here

Results 1 to 4 of 4

Thread: Convertpstyle

  1. #1
    All AUGI, all the time
    Join Date
    2009-11
    Location
    Raleigh, NC
    Posts
    710
    Login to Give a bone
    0

    Default Convertpstyle

    The last project I convrted acad.ctb to .stb. My plot styles are on my C: drive.

    Why do I have to convert the acad.ctb again instead of just convertpstyle command only now?

  2. #2
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,374
    Login to Give a bone
    1

    Default Re: Convertpstyle

    You started with the wrong ctb file. AutoCAD comes with both acad.ctb and acad.stb and you shouldn't modify any of the installed ones.
    When stb's were introduced years ago I saved acad.ctb as acad - Convert.ctb and created acad - Convert.stb using convertctb. I've used them ever since and the names make it clear what they're for.
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

  3. #3
    All AUGI, all the time
    Join Date
    2009-11
    Location
    Raleigh, NC
    Posts
    710
    Login to Give a bone
    0

    Default Re: Convertpstyle

    Quote Originally Posted by Tom Beauford View Post
    You started with the wrong ctb file. AutoCAD comes with both acad.ctb and acad.stb and you shouldn't modify any of the installed ones.
    When stb's were introduced years ago I saved acad.ctb as acad - Convert.ctb and created acad - Convert.stb using convertctb. I've used them ever since and the names make it clear what they're for.
    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.

  4. #4
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL
    Posts
    3,374
    Login to Give a bone
    0

    Default Re: Convertpstyle

    Quote Originally Posted by tim_newsome View Post
    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
    Tom Beauford P.S.M. - Civil 2020 on Windows 10 Enterprise
    Design Analysis - Leon County Public Works/Engineering Wrap [CODE] tags around selected text
    2280 Miccosukee Rd. Tallahassee, FL 32308-5310
    Ph# (850)606-1516 Home Page

Similar Threads

  1. 2020: Convertpstyle
    By tim_newsome in forum AutoCAD General
    Replies: 2
    Last Post: 2020-03-31, 07:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •