GetInContextChildren

<< Click to Display Table of Contents >>

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

GetInContextChildren

Description

Returns in the %TEMP%\DBWRESLT.IN text file the list of the children of a parent document that have a reference to the parent document itself.
This is typically the case of components created in the context of an assembly.

Syntax

call DBWShell("GetInContextChildren parentFileName")

Parameter

parentFileName

The parent document full file name

Results

The format of the result file is:

 @CHILD=<child file name>
 @CHILD=<child file name>
 @CHILD=<child file name>
 ...

See also

DBWWalkTree functionalities on the Standard Library

Example

Sub Main()

 DBWInit(TRUE)
 DBWShell("GetInContextChildren " & replace("o:\test\Assem1.SLDASM"," ","|"))
 childrenList = ""
 Set fs = CreateObject("Scripting.FileSystemObject")
 Set tfolder = fs.GetSpecialFolder(TemporaryFolder)
 Set a = fs.OpenTextFile( tfolder & "\" & "dbwreslt.in" , ForReading, True )
 Dim tokens
 Do While a.AtEndOfStream <> True
  line = a.ReadLine
  tokens = Split( line, "=", 2, 1)
  childrenList = childrenList + tokens(1) + vbcrlf
 Loop
 a.Close
 DBWMsgBox "In-Context children list:" & vbcrlf & childrenList
end sub