Hide Table of Contents
InsertSketchBlockInstance Method (ISketchManager)

Inserts a block instance at the specified location using the block definition.

.NET Syntax

Visual Basic (Declaration) 
Function InsertSketchBlockInstance( _
   ByVal BlockDef As SketchBlockDefinition, _
   ByVal Position As MathPoint, _
   ByVal Scale As System.Double, _
   ByVal Angle As System.Double _
) As SketchBlockInstance
Visual Basic (Usage) 
Dim instance As ISketchManager
Dim BlockDef As SketchBlockDefinition
Dim Position As MathPoint
Dim Scale As System.Double
Dim Angle As System.Double
Dim value As SketchBlockInstance
value = instance.InsertSketchBlockInstance(BlockDef, Position, Scale, Angle)
SketchBlockInstance InsertSketchBlockInstance( 
   SketchBlockDefinition BlockDef,
   MathPoint Position,
   System.double Scale,
   System.double Angle
SketchBlockInstance^ InsertSketchBlockInstance( 
&   SketchBlockDefinition^ BlockDef,
&   MathPoint^ Position,
&   System.double Scale,
&   System.double Angle


Block for this block instance
Position of this block instance
Scale for this block instance
Rotation angle for this block instance

Return Value

Block instance



This method creates a block definition if the block definition does not exist.

-  or -

If the definition exists, then this method uses that block definition to create the block instance. The name of the block instance is the same as the filename of the block file, without the filename extension.

If the entities of a block are associated with one or more layers and those layers do not already exist in the drawing, then the layers are inserted in the drawing and the associations between the entities of the block and the layers are maintained.

The block instance is inserted on the current drawing layer.

TIP: If inserting the same sketch block multiple times, do not create the block definition more than once. Instead, use the same block definition for each call to SketchManager::InsertSketchBlockInstance.

To save a block instance and its definition into a block file (.sldblk), use ISketchBlockDefinition::Save.

This method does not work for drawings opened in view-only mode.

See Block Definitions and Block Instances for details.


See Also


SolidWorks 2007 FCS, Revision Number 15.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:   InsertSketchBlockInstance Method (ISketchManager)
*   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) 2013 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.