|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > Tree > GetTreeParentProject |
available from build: 20070424 |
The command returns the Unique ID of the nearest Parent Project in the current Tree structure.
When used with no parameters, it returns the nearest Parent Project Unique ID of the currently selected item in the Tree. When invoked passing a Unique ID as parameter, it first tries to select a document in the current Tree with the Unique ID equal to the one passed as parameter, then returns the nearest Parent Project in the Tree structure.
call DBWShell("GetTreeParentProject [uid]")
uid |
Optional.The document unique id |
@PROJECT_UNIQUE_ID |
The unique id of the nearest Parent Project |
In this case the returned value is 1068 (project2-A).

In this case the returned value is 576 (project2).

Sub main
DBWInit(TRUE)
DBWShell("GetTreeParentProject")
if(okDBW=False) then exit sub
projectUniqueId = DBWResult("@PROJECT_UNIQUE_ID")
DBWMsgBox "The parent project unique id is " & projectUniqueId
end sub