AddToParent

<< Click to Display Table of Contents >>

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

AddToParent

Description

Adds a child relationship between a parent document and a child document. The child index value is meaningful for the ordering in the bill of materials of the parent, and may be omitted ( in which case a 0 value will be used as default ).

Syntax

call DBWShell("AddToParent DocUID ParentUID [PositionNumber]")

Parameters

DocUID

unique id of the new child document

ParentUID

unique id of the document of which the child is added to.

PositionNumber

Optional. It is an integer representing the order this document assumes in the BOM.
It does not affect the tree order.
Default value is 0 and means no particular order.

See also

AddAttachment
AddComponent
AddDocument
AddToParent

Example

'parent_uid = 324

'child1_uid = 997
'child2_uid = 998
'child3_uid = 999
DBWShell("AddToParent 999 324 1")
DBWShell("AddToParent 998 324 2")
DBWShell("AddToParent 997 324 3")