Convert to Named Plot Styles

Discussion in 'AutoCAD' started by Robert Plummer, May 7, 2004.

  1. How can I use VBA to change from color dependent plot styles to named plot
    styles?
     
    Robert Plummer, May 7, 2004
    #1
  2. Robert Plummer

    JRWalker Guest

    This is not real elegant, but it is the only way I have found to do it.


    Private Function ConvertToCtb()
    Const sRet As String = """"
    Dim sCmd As String
    Dim sPstyle As String

    sPstyle = ThisDrawing.GetVariable("PSTYLEMODE")

    If sPstyle = "0" Then
    sCmd = "(command " & sRet & "convertpstyles" & sRet & " " & ")" &
    vbCr
    ThisDrawing.SendCommand sCmd
    End If
    End Function

    (of course, this is named to color instead)

    JRWalker
     
    JRWalker, May 7, 2004
    #2
  3. Thanks. I am not too worried about pretty. This is close to what I had
    tried, but my version was hanging. This should do the trick.
     
    Robert Plummer, May 7, 2004
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.