Hide Table of Contents
DeleteRenderMaterial Method (IModelDocExtension)

Not supported in SOLIDWORKS 2011 and later. Superseded by IModelDocExtension::DeleteDisplayStateSpecificRenderMaterial and IModelDocExtension::IDeleteDisplayStateSpecificRenderMaterial.

.NET Syntax

Visual Basic (Declaration) 
Function DeleteRenderMaterial( _
   ByVal PwMaterialId As System.Integer, _
   ByVal BReassignIdsAndInvalidate As System.Boolean _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IModelDocExtension
Dim PwMaterialId As System.Integer
Dim BReassignIdsAndInvalidate As System.Boolean
Dim value As System.Boolean
value = instance.DeleteRenderMaterial(PwMaterialId, BReassignIdsAndInvalidate)
System.bool DeleteRenderMaterial( 
   System.int PwMaterialId,
   System.bool BReassignIdsAndInvalidate
System.bool DeleteRenderMaterial( 
&   System.int PwMaterialId,
&   System.bool BReassignIdsAndInvalidate


Appearance ID
True if the appearance IDs are reassigned and this appearance ID is invalidated, false if not

Return Value

True if the appearance is deleted, false if not


By default, appearance IDs are persistent, which means if three appearances (IDs 1, 2, and 3) were applied to the model, and you removed appearance ID 2, then the remaining appearance IDs are 1 and 3. However, if you set BReassignIdsAndInvalidate to true, then appearance ID 2 is invalidated and appearance ID 3 becomes appearance ID 2.

To get the IDs of all of the appearances applied to this model document, call IModelDocExtension::GetRenderMaterialsCount.


See Also


SOLIDWORKS 2008 FCS, Revision Number 16.0

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:   DeleteRenderMaterial 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) 2017 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.