Kadmos.com


?>

  Home | Products | Download | Purchase | Support | Language

Products
DXFReader ActiveX Control
 • DXF Files Overview
 • Distribution
 • Installation
 • Quick Start
 • Control Summary
 • Download
 • Buy now!
 • DXFReader Reference
  • Properties
  • Methods
   • About
   • AddAlignedDi...
   • AddBlock
   • AddBlockEntity
   • AddClass
   • AddDimStyle
   • AddEntity
   • AddLayer
   • AddLineType
   • AddObject
   • AddStyle
   • AddUCS
   • AddVertex
   • AddView
   • AddViewPort
   • Clear
   • CoordXtoPixel
   • CoordYtoPixel
   • Copy
   • DisplayView
   • DrawArc
   • DrawCircle
   • DrawEntity
   • DrawLine
   • DrawPoint
   • DrawText
   • ExplodeBlock
   • GetACIColor
   • GetEntity
   • GetRGBColor
   • InvertEntity
   • LoadBlock
   • ModifyEntity
   • NewDrawing
   • Pan
   • PixelXtoCoord
   • PixelYtoCoord
   • Plot
   • PlotPreview
   • PopupMenu
   • ReadDXF
   • ReadDXFBlocks
   • ReadDXFEntities
   • Refresh
   • Regen
   • SaveBMP
   • SaveWMF
   • SetLimits
   • ShowBlock
   • ShowPalette
   • ShowRubberAl...
   • ShowRubberBox
   • ShowRubberCi...
   • ShowRubberLine
   • WriteDXF
   • WriteDXFBlock
   • ZoomExtents
   • ZoomIn
   • ZoomLimits
   • ZoomOut
   • ZoomPicture
   • ZoomPrevious
   • ZoomSpotIn
   • ZoomSpotOut
   • ZoomUser
   • ZoomWindow
  • Events

 • DXFPlot Reference

IXF ActiveX Control

Postel ActiveX Control

Tech Support
OnLine Support
Phone Support
Sample Code
Registered Users
FAQ
References
Kadmos
Contact Kadmos
Environment
Customer List
Newsletter
Download
ActiveX Controls
Updates
Purchase
Price List
International Resellers
Our Guarantee
Shipment Options
Payment Options
Shopping Cart
    DXFReader Control - AddBlock Method

Kadmos DXFReader ActiveX Control      Previous Next
DXFReader Control
AddBlock Method

Description Adds a new block to the drawing.
Syntax [form.]DXFReader.AddBlock (BlockName As String)
Remarks If the block indicated by the BlockName parameter exists the Error event is fired with ErrorCode = 701.

The following code will add to the drawing a new block containg a line with insertion point at (0,0):

Dim EntityNum as Integer

With DXFReader

 .AddBlock "TESTLINE"

 .Blocks.Item("TESTLINE").X0 = 0
 .Blocks.Item("TESTLINE").Y0 = 0

 .AddBlockEntity "TESTLINE"
 EntityNum = .Blocks("TESTLINE").Entities.Count
 .Blocks.Item("TESTLINE").Entities.Item(EntityNum).EntityType = "LINE"
 .Blocks.Item("TESTLINE").Entities.Item(EntityNum).X0 = 0
 .Blocks.Item("TESTLINE").Entities.Item(EntityNum).Y0 = 0
 .Blocks.Item("TESTLINE").Entities.Item(EntityNum).X1 = 200
 .Blocks.Item("TESTLINE").Entities.Item(EntityNum).Y1 = 200

End With


See the Entities and the Blocks properties and the Autodesk DXF Reference for more information.

The parameter for the AddBlock method is described below:

ParameterDescription

BlockNameThe name of the block to add

Copyright © 2008/2011 Kadmos.com - All rights reserved. Privacy Policy