.NET Framework Class Library
Document.Rename Method

<< Click to Display Table of Contents >>

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

.NET Framework Class Library
Document.Rename Method

Renames a file as specified, if no parameter is passed it renames the currently selected document.

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

Syntax

Visual Basic

Public Function Rename ( _

newDocName As String, _
Optional docUid As String = "", _
Optional onlyCheck As Boolean = False _
) As ShellResult

C#

public ShellResult Rename(

string newDocName,
string docUid = "",
bool onlyCheck = false
)

Visual C++

public:

ShellResult^ Rename(
String^ newDocName,
String^ docUid = L"",
bool onlyCheck = false
)

JavaScript

function rename(newDocName, docUid, onlyCheck);

Parameters

newDocName

Type: System.String
full path name of the new document.

docUid (Optional)

Type: System.String
Optional. The renamed document unique id

onlyCheck (Optional)

Type: System.Boolean
Optional. If FALSE, the rename is executed otherwise it performs only a rename validity check (used if docUid is specified).

Return Value

Shell result object.

Remarks

If the string "USE_DATAENTR_LST" is passed as newDocName, it will be run the LST\DATAENTR.LST script for the assignment of the FILE_NAME/FILE_DIRECTORY fields (and/or any other optional field)

See Also

Document Class

Document Members

MwPDMApi Namespace