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 - ModifyEntity Method

Kadmos DXFReader ActiveX Control      Previous Next
DXFReader Control
ModifyEntity Method

Description Modifies the geometrical data of an entity.
Syntax [form.]DXFReader.ModifyEntity (EntityNumber As Long, [BasePointX As Single], [BasePointY As Single], [RotationAngle As Single], [ScaleX As Single], [ScaleY As Single], [TranslationX As Single], [TranslationY As Single])
Remarks If the entity indicated by the EntityNumber parameter does not exist in the loaded DXF file an Error 99 ("Entity not found") is generated.
All trasformations are about the(BasePointX, BasePointY) point and will change the entity data in the drawing's database.

The following code will rotate every line in the drawing about their middle point:

Dim Entity as Object
Dim n as Long
Dim PmX as Single
Dim PmY as Single

n = 0

With DXFReader1

 For Each Entity In .Entities

  n = n + 1
  If Entity.EntityType = "LINE" Then

   PmX = (Entity.X0 + Entity.X1) / 2
   PmY = (Entity.Y0 + Entity.Y1) / 2

   .ModifyEntity n, PmX, PmY, 30

  End If

 Next Entity
End With


The parameters for the ModifyEntity method are described below:

ParameterDescription

EntityNumberThe entity number
BasePointX(Optional) The X coordinate of the base point for all trasformations (Default value = 0)
BasePointY(Optional) The Y coordinate of the base point for all trasformations (Default value = 0)
RotationAngle(Optional) Value in degrees. Setting this property to a non zero value will rotate the entity (Default value = 0)
ScaleX(Optional) Setting this property will scale the entity along the X axis (Default value = 1)
ScaleY(Optional) Setting this property will scale the entity along the Y axis (Default value = 1)
TranslationX(Optional) Setting this property will translate the entity about the X axis (Default value = 0)
TranslationY(Optional) Setting this property will translate the entity about the Y axis (Default value = 0)

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