Dictionary Keynames

Discussion in 'AutoCAD' started by Dale Lundgren, Jan 14, 2004.

  1. Hi All-

    Does anyone know how to get a list of "Dictionary Keynames" or indexes? For
    instance:

    **************************************************************
    Dim oDB As AcadDatabase
    Dim oDict As AcadDictionary

    Set oDB = ThisDrawing.Database
    Set oDict = oDB.Dictionaries("AEC_PROPERTY_SET_DEFS")

    **************************************************************

    "AEC_PROPERTY_SET_DEFS" is a valid key in Building Systems 3 - how can I
    find other valid keys?

    Thanks in advance!

    Dale Lundgren
     
    Dale Lundgren, Jan 14, 2004
    #1
  2. Figured I'd post the answer I gave you already, Dale, for everyone else.
    Use the DBVIEW command as a quick, non-programming way to see what's
    available.
    ___________________________
    Mike Tuersley
    AutoCAD Clinic
    Rand IMAGINiT Technologies
     
    Mike Tuersley, Jan 14, 2004
    #2
  3. Dale Lundgren

    Jeff Mishler Guest

    Here's a sub that gets all of the dictionary key names:

    Sub dict_list()
    Dim oDB As AcadDatabase
    Dim oDicts As AcadDictionaries
    Dim oDict As AcadObject
    Dim I As Long
    Dim varDict() As Variant

    Set oDB = ThisDrawing.Database
    Set oDicts = oDB.Dictionaries
    For Each oDict In oDicts
    If TypeOf oDict Is AcadDictionary Then
    ReDim Preserve varDict(0 To I)
    varDict(I) = oDict.Name
    I = I + 1
    End If
    Next
    For I = 0 To UBound(varDict)
    Debug.Print varDict(I)
    Next
    End Sub

    HTH, Jeff
     
    Jeff Mishler, Jan 14, 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.