<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GetDictionary Method (IEdmVault5)
See Also Example

Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: Visual Basic Language Filter: C# Language Filter: C++/CLI

EPDM.Interop.epdm Namespace > IEdmVault5 Interface : GetDictionary Method (IEdmVault5)

Visual Basic
C#
C++/CLI

bsName
  Name of dictionary to get or create

bCreateIfNew
  True to create the dictionary if it does not exist, false to not

Gets or creates the specified dictionary.

# Syntax

Visual Basic |
--- | ---

    Function GetDictionary( _
       ByVal bsName As System.String, _
       ByVal bCreateIfNew As System.Boolean _
    ) As IEdmDictionary5

C# |
--- | ---

    IEdmDictionary5 GetDictionary(
       System.string bsName,
       System.bool bCreateIfNew
    )

C++/CLI |
--- | ---

    IEdmDictionary5^ GetDictionary(
    &   System.String^ bsName,
    &   System.bool bCreateIfNew
    )

#### Parameters

bsName
  Name of dictionary to get or create
bCreateIfNew
  True to create the dictionary if it does not exist, false to not

#### Return Value

IEdmDictionary5; Null if bCreateIfNew is false and the dictionary with bsName does not exist

# Example

Change Card Variables Add-in (VB.NET)
Change Card Variables Add-in (C#)
Create and Delete Dictionaries (C#)
Create and Delete Dictionaries (VB.NET)

# Remarks

A dictionary in SOLIDWORKS PDM Professional is a way of storing arbitrary data in the SOLIDWORKS PDM Professional database. The data is organized into key-value pairs. The values are always strings. The keys can be either integers or strings.

NOTE: If you intend to store file- or folder-specific data and want the data to be deleted or copied whenever the file or folder is deleted or copied, consider using card variables instead of dictionaries. Card variables stored using IEdmEnumeratorVariable5 do not require corresponding controls in the file or folder data card.

Return codes:

- S_OK: The method successfully executed.
- S_FALSE: The dictionary with the specified name does not exist, and bCreateIfNew is false.
- E_EDM_NOT_LOGGED_IN: You must call IEdmVault5::Login or IEdmVault5::LoginAuto before calling this method.

# See Also

####

IEdmVault5 Interface
IEdmVault5 Members

# Availability

SOLIDWORKS PDM Professional Version 5.2