|
<< Click to Display Table of Contents >> Navigation: Programming Mechworks PDM > DBWCommandShell > Commands Reference > CADSystem > GetInContextChildren |
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.
call DBWShell("GetInContextChildren parentFileName")
parentFileName |
The parent document full file name |
The format of the result file is:
@CHILD=<child file name>
@CHILD=<child file name>
@CHILD=<child file name>
...
DBWWalkTree functionalities on the Standard Library
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