CreateBlockDefinition Method (IDocument) Send Feedback
See Also  Example
BlockDefinition[out]
Block definition
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
Creates a Block definition.

Syntax

Visual Basic 
Function CreateBlockDefinition( _
   ByVal BlockName As System.String, _
   ByVal Description As System.String, _
   ByVal BasePointX As System.Double, _
   ByVal BasePointY As System.Double, _
   ByVal BasePointZ As System.Double, _
   ByVal EntityTypeLongArray As System.Object, _
   ByVal EntitiesArray As System.Object, _
   ByVal 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