Hide Table of Contents
GetAllExternalReferences4 Method (ISwDMDocument13)

Gets all of the external references used in this drawing document, including the statuses of any broken external references.

.NET Syntax

Visual Basic (Declaration) 
Function GetAllExternalReferences4( _
   ByVal pSrcOption As SwDMSearchOption, _
   ByRef brokenRefVar As Object, _
   ByRef IsVirtual As Object, _
   ByRef TimeStamp As Object _
) As Object
Visual Basic (Usage) 
Dim instance As ISwDMDocument13
Dim pSrcOption As SwDMSearchOption
Dim brokenRefVar As Object
Dim IsVirtual As Object
Dim TimeStamp As Object
Dim value As Object
 
value = instance.GetAllExternalReferences4(pSrcOption, brokenRefVar, IsVirtual, TimeStamp)
C# 
object GetAllExternalReferences4( 
   SwDMSearchOption pSrcOption,
   out object brokenRefVar,
   out object IsVirtual,
   out object TimeStamp
)
C++/CLI 
Object^ GetAllExternalReferences4( 
&   SwDMSearchOption^ pSrcOption,
&   [Out] Object^ brokenRefVar,
&   [Out] Object^ IsVirtual,
&   [Out] Object^ TimeStamp
) 

Parameters

pSrcOption
Pointer to the ISwDMSearchOption object
brokenRefVar
Array of the statuses of any broken external references as defined in swDmReferenceStatus (see Remarks)
IsVirtual
Array of Booleans that indicate whether each reference corresponds to a virtual component
TimeStamp
Array of time stamps in time_t format

Return Value

Array of the names of the external references used in this document

Example

Remarks

Use this method for drawing documents; use ISwDMDocument15::GetExternalFeatureReferences for part and assembly documents.

This method only supports model documents saved in SolidWorks 2009 and later.

Although this method returns valid data for files created in SolidWorks 2005 and earlier, this method only returns valid data for the brokenRefVar argument for files created in SolidWorks 2005 files and later. For files created in versions of SolidWorks earlier than SolidWorks 2005, it returns swDmReferenceStatusUnknown for brokenRefVar.

 

Call this method before calling ISwDMDocument::ReplaceReference.

 

The SolidWorks Document Manager API applies the same rules when searching for a reference as described in the SolidWorks Help. The mix-and-match of sub-folder combinations is applied to the current document, which for the SolidWorks Document Manager is the document attached using ISwDMApplication::GetDocument and the reference being searched for. You can set up the list of folders to be searched using ISwDMSearchOption::AddSearchPath, which is equivalent to using the SolidWorks user-interface commands Tools, Options, System Options, File Locations, Referenced Documents.

 

Two differences between SolidWorks and the SolidWorks Document Manager API searches are:


 

  • the path of the last opened visible top-level document (drawing or assembly) is not tried directly.

  • the last user path is not tried directly.

as these concepts have little meaning when SolidWorks is not running.

 

SolidWorks does not open suppressed components of assemblies in memory. Thus, information, such as a suppressed component's time stamp, is not updated when the assembly is rebuilt. You can call ISwDMComponent6::PathName to compare the path returned by ISwDMDocument13::GetAllExternalReferences4 and call ISwDMComponent::IsSuppressed to find out if the component is suppressed.

 

Because the search routine is shared between SolidWorks and the SolidWorks Document Manager API, most of the same changes apply going from SolidWorks 2006 to SolidWorks 2007 and later. However, one significant change related to caching of resolved paths for references being searched for in SolidWorks does not apply to the SolidWorks Document Manager API. In SolidWorks 2007 and later, the next time these references are needed, a simple lookup suffices instead of a potentially lengthy search. However, because this caching mechanism was not applied to the SolidWorks Document Manager API, the SolidWorks Document Manager API in 2006 and 2007, and later, exhibit similar behavior.

 

The array of time stamps are in time_t format, which Microsoft defines "as time as seconds elapsed since midnight, January 1, 1970 or -1 in the case of error". You must either have built-in functions to convert these values to something more accessible or write your own functions.

 

See Also

Availability

SolidWorks Document Manager API 2009 SP0


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:   GetAllExternalReferences4 Method (ISwDMDocument13)
*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) 2012 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.