Hide Table of Contents
IGetDocumentDependencies2 Method (ISldWorks)

Gets all of the model dependencies for a document.

.NET Syntax

Visual Basic (Declaration) 
Function IGetDocumentDependencies2( _
   ByVal Document As String, _
   ByVal Traverseflag As Boolean, _
   ByVal Searchflag As Boolean, _
   ByVal AddReadOnlyInfo As Boolean _
) As String
Visual Basic (Usage) 
Dim instance As ISldWorks
Dim Document As String
Dim Traverseflag As Boolean
Dim Searchflag As Boolean
Dim AddReadOnlyInfo As Boolean
Dim value As String
 
value = instance.IGetDocumentDependencies2(Document, Traverseflag, Searchflag, AddReadOnlyInfo)
C# 
string IGetDocumentDependencies2( 
   string Document,
   bool Traverseflag,
   bool Searchflag,
   bool AddReadOnlyInfo
)
C++/CLI 
String^ IGetDocumentDependencies2( 
&   String^ Document,
&   bool Traverseflag,
&   bool Searchflag,
&   bool AddReadOnlyInfo
) 

Parameters

Document

Name of the document

Traverseflag

True if you want to traverse down into all dependent files, false if you want only the highest level within the dependencies

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

AddReadOnlyInfo

True if you wish to have read-only information with the filenames; false if not

Return Value

  • in-process, unmanaged C++: Pointer to an array 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

  • VBA, VB.NET, C#, and C++/CLI: Not supported

See In-process Methods for details about this type of method.

Remarks

Before calling this method, call ISldWorks::IGetDoucmentDependenciesCount2 to determine the size of the returned arrayl

As an example, calling this method on a drawing document returns a list of all the part and assemblies used in the drawing. If you set the Traverseflag to True, then each of the parts within the assembly file are also returned in this array of strings.

Another example would be calling this method with a derived mirror part. Because a derived mirror part is generated from another part, the list of model dependencies returned by this method would include the original part used to generate the derived mirror part.

Be aware that Library features are completely unassociated. They do not require the library nor do they update when changes are made to the Library feature. Therefore, this method would not return Library features.

If you use this method with an assembly that contains two documents, Part1 and SubAssem1, an example of what might be returned is:

 [ "Part1", "C:\temp\Part1.SLDPRT", "SubAssem1", "c:\temp\SubAssem1.SLDASM" ]

If Traverseflag is set to True, then all of the documents contained in SubAssem1.ASM are also returned. Suppressed components are recognized and returned by this method as a dependent file.

If the AddReadOnlyInfo flag is set to True, then a string of "Read-Only" is added to the list of strings. If Part1 from were read-only, then the resulting set of strings would be:

 [ "Part1", "C:\temp\Part1.SLDPRT", "Read-Only", "SubAssem1", "c:\temp\SubAssem1.SLDASM", "" ]

NOTE: If the SearchFlag is set to True, then the current directory is set to the directory of the document file. This replicates the interactive behavior of the References button in the File Open dialog window.

 

See Also

Availability

SolidWorks 2000 FCS, Revision Number 8.0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   IGetDocumentDependencies2 Method (ISldWorks)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2010 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.