<xml> </xml>

SOLIDWORKS PDM Professional API Help | Send Feedback
GetReferenceTree Method (IEdmFile5)
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 > IEdmFile5 Interface : GetReferenceTree Method (IEdmFile5)

Visual Basic
C#
C++/CLI

lParentFolderID
  ID of the file's parent folder (see Remarks)

lVersionNo
  Version of the file for which to get references; 0 to get the latest version

Gets an interface to the files that reference or are referenced by this file.

# Syntax

Visual Basic |
--- | ---

    Function GetReferenceTree( _
       ByVal lParentFolderID As System.Integer, _
       Optional ByVal lVersionNo As System.Integer _
    ) As IEdmReference5

C# |
--- | ---

    IEdmReference5 GetReferenceTree(
       System.int lParentFolderID,
       System.int lVersionNo
    )

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

    IEdmReference5^ GetReferenceTree(
    &   System.int lParentFolderID,
    &   System.int lVersionNo
    )

#### Parameters

lParentFolderID
  ID of the file's parent folder (see Remarks)
lVersionNo
  Version of the file for which to get references; 0 to get the latest version

#### Return Value

IEdmReference5

# Example

Get File References for a File (C#)
Get File References for a File (VB.NET)

# Remarks

Some file types, such as files from AutoCAD, SOLIDWORKS, MS Word, etc., contain references to other files. You can also set up your own references via SOLIDWORKS PDM Professional's User Defined File References dialog box. SOLIDWORKS PDM Professional manages all of these references for you, and they appear in the check-in dialog box in the form of a reference tree.

To specify lParentFolderID, inspect all of the parent folders of this file by calling IEdmFile5::GetFirstFolderPosition and IEdmFile5::GetNextFolder.

Use IEdmReference5 that is returned in ppoRetRoot to enumerate referenced files and referencing files and set up user-defined references.

C++ programmers not using smart-pointer wrapper functions must release the returned interface, IEdmReference5.

See Return Codes for the complete list of potential success and error codes. The following are just a few examples:

- S_OK: The method successfully executed.
- S_FALSE: An argument is invalid.

# See Also

####

IEdmFile5 Interface
IEdmFile5 Members

# Availability

SOLIDWORKS PDM Professional Version 5.2