Hide Table of Contents
IGetObjectByPersistReference3 Method (IModelDocExtension)

Gets the object assigned to the specified persistent reference ID.

.NET Syntax

Visual Basic (Declaration) 
Function IGetObjectByPersistReference3( _
   ByVal Count As System.Integer, _
   ByRef PersistId As System.Byte, _
   ByRef ErrorCode As System.Integer _
) As System.Object
Visual Basic (Usage) 
Dim instance As IModelDocExtension
Dim Count As System.Integer
Dim PersistId As System.Byte
Dim ErrorCode As System.Integer
Dim value As System.Object
value = instance.IGetObjectByPersistReference3(Count, PersistId, ErrorCode)
System.object IGetObjectByPersistReference3( 
   System.int Count,
   ref System.byte PersistId,
   out System.int ErrorCode
System.Object^ IGetObjectByPersistReference3( 
&   System.int Count,
&   System.byte% PersistId,
&   [Out] System.int ErrorCode


Size of persistent reference ID (see Remarks)

Object's persistent reference ID (see Remarks)

Success or error code as defined by swPersistReferencedObjectStates_e (see Remarks)

Return Value

Object (see Remarks)


A persistent reference ID is related to a model. It is portable and can be saved within the model or in other places. Some persistent reference IDs are general to all models and can be instantiated from all models. Your application must handle persistent reference IDs and their relationships among models.


Before calling this method:

  1. Call IModelDocExtension::GetPersistentReferenceCount3 to determine the size of the persistent reference ID.
  2. Call IModelDocExtension::IGetPersistReference3 to get the object's persistent reference ID.

The swPersistReferencedObject_Suppressed and swPersistReferencedObject_Deleted enumerators only apply to references of topological entities.


IModelDocExtension::GetObjectByPersistReference3 was designed to return the base class of a feature to take advantage of the base feature class functionality. Objects returned by IModelDocExtension::GetObjectByPersistReference3 are often features, including IConfiguration, IRefPlane, and IRefAxis objects. You must first obtain a reference to a feature, and then use IFeature::GetSpecificFeature2 to get the original object.


See Persistent Reference IDs for more information.


See Also


SOLIDWORKS 2007 SP3, Revision Number 15.3

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

Subject:   Feedback on Help Topics
Page:   IGetObjectByPersistReference3 Method (IModelDocExtension)
*   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:


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

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.