CreateNewProject

<< Click to Display Table of Contents >>

Navigation:  Programming Mechworks PDM > DBWCommandShell > Commands Reference > Project >

CreateNewProject

Description

Creates a new project.

Syntax

call DBWShell( "CreateNewProject ProjID [ParentProjUID [ShowInputForm]]" )

Parameters

ProjID

It is the new project id

ParentProjUID

Optional. unique id of the parent project.
this parameter has to be equal to 0 ( zero ) if a top level project needs to be created

ShowInputForm

Optional.
0: hide the Input Form
1: show the Input Form

Outputs

@DOCUMENT_UNIQUE_ID

the document unique id of the just created project

Remarks

Projects can have only project document type as parent.

Example

Please note the usage of the okErrorMessages to avoid the error message in case the CANCEL button has been pressed in the Data Input Form.

...

okErrorMessages = FALSE
newproject = "My new project"
DBWShell("CreateNewProject " & replace(newproject, " ", "|")  & " 0 1")
uid = DBWResult("@DOCUMENT_UNIQUE_ID")
DBWMsgBox "you've just created a project with uid=" & uid
okErrorMessages = TRUE
...