Gets all of this model's dependencies.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As IModelDocExtension
Dim Traverseflag As System.Boolean
Dim Searchflag As System.Boolean
Dim AddReadOnlyInfo As System.Boolean
Dim ListBrokenRefs As System.Boolean
Dim AppendImportedPaths As System.Boolean
Dim value As System.Object
value = instance.GetDependencies(Traverseflag, Searchflag, AddReadOnlyInfo, ListBrokenRefs, AppendImportedPaths) |
Parameters
- Traverseflag
- True to traverse all dependency levels, false to get first level (see Remarks)
- Searchflag
- True to use the search rules to find dependencies, false to look where the documents were last saved (see Remarks)
- AddReadOnlyInfo
- True to show read-only information in the returned strings, false to not (see Remarks)
- ListBrokenRefs
- True to get broken references, false to not
- AppendImportedPaths
- True to append imported path names, false to not (see Remarks)
Return Value
Array of strings (see Remarks)
Example
'VBA
'This example shows how to return all of the dependent files
'for the currently active document. You can run this program
'on any type of SOLIDWORKS document.
Option Explicit
Sub main()
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim vDepend As Variant
Dim i As Long
Set swApp = CreateObject("SldWorks.Application")
Set swModel = swApp.ActiveDoc
vDepend = swModel.GetDependencies(True, True, True, True, True)
Debug.Print swModel.GetPathName
For i = 0 To (UBound(vDepend) - 1) / 2
Debug.Print " " + vDepend(2 * i) + " --> " + vDepend(2 * i + 1)
Next i
End Sub
Remarks
See Also
Availability
SOLIDWORKS 2018 FCS, Revision Number 26.0