.NET Framework Class Library
Document.AddDocument Method

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > .NET API > MwPDMApi Namespace > Document Class > Document Methods >

.NET Framework Class Library
Document.AddDocument Method

Links as a child a document file to the current selected document (that can be a project or any other object selectable through the SelectById).

Namespace: MwPDMApi
Assembly:  MwPDMApi (in MwPDMApi.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

Visual Basic

Public Function AddDocument ( _

path As String, _
Optional parentUid As Integer = 0, _
Optional registerChilds As Boolean = False, _
Optional traverseSubAssemblies As Nullable(Of Boolean) = Nothing _
) As Integer

C#

public int AddDocument(

string path,
int parentUid = 0,
bool registerChilds = false,
Nullable<bool> traverseSubAssemblies = null
)

Visual C++

public:

int AddDocument(
String^ path,
int parentUid = 0,
bool registerChilds = false,
Nullable<bool> traverseSubAssemblies = nullptr
)

JavaScript

function addDocument(path, parentUid, registerChilds, traverseSubAssemblies);

Parameters

path

Type: System.String
Full path of the document to add

parentUid (Optional)

Type: System.Int32
Unique ID of the parent document

registerChilds (Optional)

Type: System.Boolean
If TRUE, registers the children documents as well

traverseSubAssemblies (Optional)

Type: System.Nullable(Boolean)
Optional. If TRUE, traverse the subassemblies structures if not yet registered

Return Value

Unique ID of the added document, or 0 if the operation failed

See Also

Document Class

Document Members

MwPDMApi Namespace