Hide Table of Contents
CreateBlockDefinition Method (IDocument)
BlockDefinition[out]
Block definition

Creates a Block definition.

.NET Syntax

Visual Basic (Declaration) 
Function CreateBlockDefinition( _
   const dsString& BlockName As System.String, _
   const dsString& Description As System.String, _
   double BasePointX As System.Double, _
   double BasePointY As System.Double, _
   double BasePointZ As System.Double, _
   const dsLongArray& EntityTypeLongArray As System.Object, _
   const dsObjectPtrArray& EntitiesArray As System.Object, _
   dsBlockDefinitionEntities_e BlockDefinitionEntities As dsBlockDefinitionEntities_e _
) As BlockDefinition
C# 
BlockDefinition CreateBlockDefinition( 
   System.string BlockName,
   System.string Description,
   System.double BasePointX,
   System.double BasePointY,
   System.double BasePointZ,
   System.object EntityTypeLongArray,
   System.object EntitiesArray,
   dsBlockDefinitionEntities_e BlockDefinitionEntities
)
JavaScript 
CreateBlockDefinition( 
   BlockName : String,
   Description : String,
   BasePointX : Number,
   BasePointY : Number,
   BasePointZ : Number,
   EntityTypeLongArray : Array,
   EntitiesArray : Array,
   BlockDefinitionEntities : String
) : dsBlockDefinition
COM native C++ 
HRESULT CreateBlockDefinition( 
   BSTR BlockName,
   BSTR Description,
   DOUBLE BasePointX,
   DOUBLE BasePointY,
   DOUBLE BasePointZ,
   VARIANT EntityTypeLongArray,
   VARIANT EntitiesArray,
   dsBlockDefinitionEntities_e BlockDefinitionEntities,
   IBlockDefinition** BlockDefinition
) 
C++ 
DSRESULT CreateBlockDefinition( 
   const dsString& BlockName,
   const dsString& Description,
   double BasePointX,
   double BasePointY,
   double BasePointZ,
   const dsLongArray& EntityTypeLongArray,
   const dsObjectPtrArray& EntitiesArray,
   dsBlockDefinitionEntities_e BlockDefinitionEntities,
   dsBlockDefinition** BlockDefinition
) 

Parameters

BlockName
Name of the Block definition
Description
Description of Block definition
BasePointX
x coordinate for the base point of the Block definition
BasePointY
y coordinate for the base point of the Block definition
BasePointZ
z coordinate for the base point of the Block definition
EntityTypeLongArray
Array of longs of the types of source entities in the Block definition as defined in dsObjectType_e
EntitiesArray
Array of objects of the source entities in the Block definition
BlockDefinitionEntities
Options for the source entities of the Block definition as defined in dsBlockDefinitionEntities_e
BlockDefinition[out] or Return Value
Block definition

Example

Remarks

If a Block definition with the specified name already exists in the drawing, then that Block definition is overwritten by this method.

 

See Also

Availability

DraftSight V1R1.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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CreateBlockDefinition Method (IDocument)
*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) 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.