SldWorks::GetDocumentDependencies2
Description
This method gets all of the model dependencies for a document. The document does not have to be open unless traversal down into all dependent files is desired.
Syntax (OLE Automation)
retval = SldWorks.GetDocumentDependencies2 ( document, traverseFlag, searchFlag, addReadOnlyInfo )
Input: (BSTR) document Name of the document Input: (VARIANT_BOOL) traverseflag TRUE if you want to traverse down into all dependent files, FALSE if you want only the highest level within the dependencies Input: (VARIANT_BOOL) SearchFlag Set this argument to TRUE if you want to use the search rules to find dependencies, FALSE looks where the documents were last saved Input: (VARIANT_BOOL) addReadOnlyInfo TRUE if you wish to have read-only information with the filenames; FALSE if not Return: (VARIANT) retval SafeArray of strings with two strings for each document returned in this list of dependent files:
File name: Filename with the complete pathname; this combination repeats itself for each dependent file found for this document sub main()
dim retval as variant dim swapp as sldworks.sldworks dim intCount as integer
retval = swapp.GetDocumentDependencies2 ( "c:\myfiles\mydrawing.slddrw", true, true, true)
for intcount = 0 to ubound(retval)
debug.print retval(intcount)
next intcount
end sub