Hide Table of Contents
Get3rdPartyStorage Method (ISwDMDocument19)

Gets an IStream interface to the specified third-party storage of this model document.

.NET Syntax

Visual Basic (Declaration) 
Function Get3rdPartyStorage( _
   ByVal StringIn As System.String, _
   ByVal IsStoring As System.Boolean _
) As System.Object
Visual Basic (Usage) 
Dim instance As ISwDMDocument19
Dim StringIn As System.String
Dim IsStoring As System.Boolean
Dim value As System.Object
value = instance.Get3rdPartyStorage(StringIn, IsStoring)
System.object Get3rdPartyStorage( 
   System.string StringIn,
   System.bool IsStoring
System.Object^ Get3rdPartyStorage( 
&   System.String^ StringIn,
&   System.bool IsStoring


Name of the stream; the name should be less than 30 characters and must be unique and qualified among all of the software parties storing within the current session
True if writing data, false if reading data

Return Value

Pointer to Unknown (see Remarks)



After calling this method, you must call ISwDMDocument19::Release3rdPartyStorage. Otherwise, the third-party node might remain locked and prevent future access.

NOTE: The name given to the storage stream should be registered so that no conflicts occur. Once registered, the stream name is reserved exclusively for your application.

Passing the unique ID string and a flag to determine if data is being stored or loaded returns an IUnknown pointer. You must then use QueryInterface() to get the Microsoft.VisualStudio.OLE.Interop.IStream interface. The stream object is used for serialization and then released in the third-party code.

SwRootStorage --|


        |-- ThirdPty --|


                |-- <SW Assigned IStream name 1>


                |-- <SW Assigned IStream name 2>


                |-- <SW Assigned IStream name 3>




                |-- <SW Assigned IStream name n>


The IStream object used by the third party is written under an IStorage object called ThirdPty in the SOLIDWORKS compound document. Each third party writes to a single IStream object whose name is assigned by SOLIDWORKS.

NOTE: If you are using serialization, then be careful with the standard MFC macros. Otherwise, you may get a message like Unexpected File Format after your application is unloaded. One way of using IMPLEMENT_SERIAL:



See Also


SOLIDWORKS Document Manager API 2015 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

Subject:   Feedback on Help Topics
Page:   Get3rdPartyStorage Method (ISwDMDocument19)
*   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) 2019 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.