Hide Table of Contents
GetExternalFeatureReferences2 Method (ISwDMDocument18)

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

.NET Syntax

Visual Basic (Declaration) 
Function GetExternalFeatureReferences2( _
   ByVal ExtRefOption As SwDMExternalReferenceOption2 _
) As System.Integer
Visual Basic (Usage) 
Dim instance As ISwDMDocument18
Dim ExtRefOption As SwDMExternalReferenceOption2
Dim value As System.Integer
 
value = instance.GetExternalFeatureReferences2(ExtRefOption)
C# 
System.int GetExternalFeatureReferences2( 
   SwDMExternalReferenceOption2 ExtRefOption
)
C++/CLI 
System.int GetExternalFeatureReferences2( 
&   SwDMExternalReferenceOption2^ ExtRefOption
) 

Parameters

ExtRefOption
An ISwDMExternalReferenceOption2 object (see Remarks)

Return Value

Number of external references in this document

Example

Remarks

Use this method with parts and assemblies; use ISwDMDocument13::GetAllExternalReferences4 with drawings.

Before calling this method:

  1. Call ISwDMApplication4::GetExternalReferenceOptionObject2 to obtain an ISwDMExternalReferenceOption2 object.
  2. Set ISwDMExternalReferenceOption::Configuration.
  3. Set ISwDMExternalReferenceOption::NeedSuppress.
  4. Set ISwDMExternalReferenceOption::SearchOption.
  5. Assign this method's ExtRefOption parameter to the ISwDMExternalReferenceOption2 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 ISwDMDocument18::GetExternalFeatureReferences2.
  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 subfolder combinations is applied to the current document, which for the SolidWorks Document Manager API is the document attached using ISwDMApplication::GetDocument and the reference for which is being searched. 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.

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 2014 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:   GetExternalFeatureReferences2 Method (ISwDMDocument18)
*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) 2014 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.