Results 1 to 3 of 3

Thread: Convertpstyle

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

    Default Convertpstyle

    Convertpstyle from ctb to stb a few years ago was not an issue. Is the a converter agent or file that I need?

  2. #2
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,419
    Login to Give a bone
    0

    Default Re: Convertpstyle

    You're not very clear on what issue you're having. btw, it CONVERTPSTYLES with an S. Maybe that's your issue?
    C:> ED WORKING....


    LinkedIn

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

    Default Re: Convertpstyle

    For using CONVERTPSTYLES you need a CTB plotstyle along with a matching STB plotstyle to convert to.
    Many years ago I came up the attached plotstyles to make it easier.

    Later I added a lisp function to quickly convert outside drawings to FDOT.stb from Florida Dept. Of Transportation
    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)
     )
    Hope that helps.
    Attached Files Attached Files

Posting Permissions

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