Hide Table of Contents
GetAllExternalReferences5 Method (ISwDMDocument21)

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

.NET Syntax

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

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
ImportedPaths
Array of strings containing the full path names of imported components; empty string if component is not imported (see Remarks)

Return Value

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

Example

See the ISwDMDocument21 examples.

Remarks

Use this method for drawings; use ISwDMDocument15::GetExternalFeatureReferences for parts and assemblies.

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 in brokenRefVar for files created in SOLIDWORKS 2005 files and later. For files created in versions of SOLIDWORKS earlier than SOLIDWORKS 2005, it returns swDmReferenceStatusUnknown in 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.

 

Because the search routine is shared between SOLIDWORKS and the SOLIDWORKS Document Manager API, most of the changes to the search routine apply to the SOLIDWORKS Document Manager API from SOLIDWORKS 2006, onward. 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, the next time these cached references are needed, a simple lookup can be performed. This caching mechanism was not applied to the SOLIDWORKS Document Manager API in 2007. The search routines for SOLIDWORKS Document Manager API 2007, onward, are the same as that of SOLIDWORKS Document Manager API 2006.

 

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 compare ISwDMComponent6::PathName to the path returned by this method and then call ISwDMComponent::IsSuppressed to find out if the component is suppressed.

 

The array of time stamps are in time_t format, which Microsoft defines 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.

 

ImportedPaths contains full path names of imported references in the following supported import formats:

 

Format Extension
Autodesk Inventor IPT, IAM
CATIA V5 CATPART, CATPRODUCT
PTC Creo PRT, XPR, ASM, XAS
Siemens NX PRT
Solid Edge PAR, PSM, ASM

 

 

See Also

Availability

SOLIDWORKS Document Manager API 2017 SP02


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:   GetAllExternalReferences5 Method (ISwDMDocument21)
*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) 2018 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.