Results 1 to 1 of 1

Thread: Newbie need vba hlep: convert CTB to STB, and

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2010-04
    Posts
    1
    Login to Give a bone
    0

    Default Newbie need vba hlep: convert CTB to STB, and

    Im using this code but it does not work, please help
    Code:
    Sub ToggleLayers()
    Dim i As Integer
    Dim blnlayerstate As Boolean
    Dim objLayer As AcadLayer
        On Error Resume Next
        ThisDrawing.ActiveLayout.StyleSheet = "named.stb"
        If blnlayerstate = False Then
            i = 0
            For Each objLayer In ThisDrawing.Layers
                    objLayer.PlotStyleName = "style1"
            Next
        End If
    End Sub
    
    prior to this code run this and this seems to work fine
    Private Function ConvertToStb()
    Const sRet As String = """"
    Dim sCmd As String
    Dim sPstyle As String
    sPstyle = ThisDrawing.GetVariable("PSTYLEMODE")
    If sPstyle = "1" Then
    sCmd = "(command " & sRet & "convertpstyles" & sRet & " " & ")" & vbCr & "Convertstyle" & vbCr
    ThisDrawing.SendCommand sCmd
    End If
    End Function
    Best regard
    Jesper
    Last edited by Ed Jobe; 2015-04-22 at 05:07 PM. Reason: Added Code Tags

Similar Threads

  1. NewBie
    By ppathak in forum New Forum Users (Non technical)
    Replies: 4
    Last Post: 2008-09-23, 03:50 PM
  2. Newbie
    By bmitchell555172581 in forum New Forum Users (Non technical)
    Replies: 3
    Last Post: 2008-09-08, 01:04 PM
  3. Greetings from newbie
    By harisma23 in forum New Forum Users (Non technical)
    Replies: 21
    Last Post: 2006-04-05, 02:49 PM
  4. Replies: 9
    Last Post: 2005-06-29, 09:49 PM

Tags for this Thread

Posting Permissions

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