Hide Table of Contents
GetExternalFeatureReferences Method (ISwDMDocument15)

Gets all of the external references related to features in part and assembly files, such as inserted or mirrored parts, in this document.

.NET Syntax

Visual Basic (Declaration) 
Function GetExternalFeatureReferences( _
   ByRef ExtRefOption As SwDMExternalReferenceOption _
) As Integer
Visual Basic (Usage) 
Dim instance As ISwDMDocument15
Dim ExtRefOption As SwDMExternalReferenceOption
Dim value As Integer
 
value = instance.GetExternalFeatureReferences(ExtRefOption)
C# 
int GetExternalFeatureReferences( 
   out SwDMExternalReferenceOption ExtRefOption
)
C++/CLI 
int GetExternalFeatureReferences( 
&   [Out] SwDMExternalReferenceOption^ ExtRefOption
) 

Parameters

ExtRefOption
An ISwDMExternalReferenceOption object (see Remarks)

Return Value

Number of external references used in this document

Example

Remarks

Use this method for part and assembly documents; use ISwDMDocument13::GetAllExternalReferences4 for drawing documents.

This method only works in documents saved in SolidWorks 2011 SP0 or later.

Before calling this method:

  1. Call ISwDMApplication3::GetExternalReferenceOptionObject to obtain an ISwDMExternalReferenceOption object.
  2. Set ISwDMExternalReferenceOption::Configuration.
  3. Set ISwDMExternalReferenceOption::NeedSuppress.
  4. Set ISwDMExternalReferenceOption::SearchOption.
  5. Assign this method's ExtRefOption parameter to the ISwDMExternalReferenceOption object.

After calling this method, call ISwDMExternalReferenceOption::ExternalReferences and ISwDMExternalReferenceOption::ReferencedConfigurations to obtain the external feature references and their configurations.

To find out if an external feature reference is suppressed:

  1. Call ISwDMComponent6::PathName to set one of the external components returned by ISwDMDocument15::GetExternalFeatureReferences.
  2. Call ISwDMComponent::IsSuppressed.

The suppression states and other information of all of the external references are also embedded in the parent document. To obtain this information in XML format, call ISwDMDocument::GetXMLStream.

 

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 API 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 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.

 

See Also

Availability

SolidWorks Document Manager API 2011 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:   GetExternalFeatureReferences Method (ISwDMDocument15)
*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.