Results 1 to 1 of 1

Thread: Dictionary for TableStyle not creating.

  1. #1
    I could stop if I wanted to
    Join Date
    2006-09
    Posts
    255
    Login to Give a bone
    0

    Default Dictionary for TableStyle not creating.

    Hi
    A. '07

    Any idea why myStyle returns Nothing for the code below?
    It should test to see if a table style existing & create it if it doesn't.

    tblDict correctly returns with one item in it (The Standard style)

    What's irritating about this is that it worked when I first wrote it a year ago.

    Any ideas for a solutions?

    Thanks
    Dave F.

    Code:
    Dim tblDict As AcadDictionary
    Dim myStyle As AcadTableStyle 
    
    Function SetStyle(ByVal Name As String)
      Set tblDict = ThisDrawing.Database.Dictionaries.Item("ACAD_TableStyle") ' create a list of Tables
      On Error Resume Next
      tblDict.Item (Name) ' does it exist
      If Err <> 0 Then  ' if it doesn't - create it
        Set myStyle = tblDict.AddObject(Name, "AcDbTableStyle")
        With myStyle
         <etc>...
    Last edited by Opie; 2009-05-27 at 05:31 PM. Reason: [code] tags added

Similar Threads

  1. How to create a new TableStyle ?
    By viz_ken1030 in forum AutoLISP
    Replies: 11
    Last Post: 2011-11-23, 01:35 PM
  2. Current Tablestyle
    By BeetleJuice in forum VBA/COM Interop
    Replies: 1
    Last Post: 2010-11-22, 10:33 AM
  3. how do I change current TableStyle?
    By allen.hart in forum Dot Net API
    Replies: 2
    Last Post: 2010-02-16, 03:23 PM
  4. Replies: 1
    Last Post: 2007-09-14, 02:26 PM
  5. ACAD wipeout dictionary creating
    By kpblc2000 in forum AutoLISP
    Replies: 4
    Last Post: 2006-12-18, 08:12 AM

Posting Permissions

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