.AboutEntityObject(self)
<This method is created only for the noting purpose>
About editting PyPCAD entity object:Users shall consult the reference document for exact supported property in terms of every kind of cad
entity.Some commen property and method has been summed up as below:
(1)Commen Property:
(a)object.color=X
X:built-in contant, such as win32com.client.constants.acRed.Here,color is lowercase.
(b)object.Layer=X
X:string, the name of the layer
(c)object.Linetype=X
X:string,the name of the loaded linetype
(d)object.LinetypeScale=X
X:float,the linetype scale
(e)object.Visible=X
X:boolean,Determining whether the object is visible or invisible
(f)object.EntityType
read-only,returns an integer.
(g)object.EntytyName
read-only,returns a string
(h)object.Handle
read-only,returns a string
(i)object.ObjectID
read-only,returns a long integer
(j)object.Lineweight=X
X:built-in constants,(For example, win32com.client.constants.acLnWt030(0.3mm),acLnWt120 is
1.2mm, and the scope of lineweight is 0~2.11mm),or acByLayer(the same with the layer
where it lies),acByBlock,acBylwDefault.
(2)Commen Method:
(a)Copy
RetVal=object.Copy
RetVal: New created object
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
(b)Offset
RetVal=object.Offset(Distance)
RetVal:New created object tuple
Distance:Double,positive or negative
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
(c)Mirror
RetVal=object.Mirror(point1,point2)
RetVal:mirror object
point1,point2:end of mirror axis, Apoint type.
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
(d)ArrayPolar
RetVal=object.ArrayPolar(NumberOfObject,AngleToFill,CenterPoint)
RetVal:New created object tuple
NumberOfObject:integer,the number of array object(including object itself)
AngleToFill:Double,rad angle, positive->anticlockwise,negative->clockwise
CenterPoint:Double,Apoint type. The center of the array.
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
(e)ArrayRectangular
RetVal=object.ArrayRectangular(NumberOfRows,NumberOfColumns,NumberOfLevels,
DistBetweenRows,DistBetweenColumns,DistBetweenLevels)
RetVal:new created object tuple
NumberOfRows,NumberOfColumns,NumberOfLevels:integer,the number of row,column,level,
if it is the plain array that is performed, NumberOfLevels=1
DistBetweenRows,DistBetweenColumns,DistBetweenLevels:Double,the distance between rows,
columns,levels respectively.When NumberOfLevels=1,DistBetweenLevels is valid but still
need to be passed
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
(f)Move
object.Move(point1,point2)
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
point1,point2:Double,Apoint type. The moving vector shall be determined by the
two points and point1 is the start point, point2 is the end point.
(g)Rotate
object.Rotate(BasePoint,RotationAngle)
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
BasePoint:Double,Apoint type.The rotation basepoint.
RotationAngle:Double,rad angle.
(h)ScaleEntity
object.ScaleEntity(BasePoint,ScaleFactor)
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
BasePoint:Double,Apoint type.The scale basepoint.
ScaleFactor:Double,Apoint type.
(i)Erase
object.Erase()
object:Choosed set
Delete all entity in the choosen scope
(J)Delete
object.Delete()
object:specified entity, as for set object,such as modelSpace set and layerSet , this
method is valid.
(k)Update
object.Update()
update object after some kind of the objects' editing.
(L)color
object.color
Here attention please, it is color,Not Color.(lowercase)
(M)TransformBy
object.TransformBy(transformationMatrix)
object:Drawing entity,such as Arc,Line,LightweithPolyline,Spline,etc.
transformationMatrix:4*4 Double array, need to be passed to ArrayTransform() method to be the required type
(3)Refer to Object
(a)HandleToObject
RetVal=object.HandleToObject(Handle)
Retval:the entity object corresponding to Handle
object:Document object
Handle: the handle of entity object
(b)ObjectIdToObject
RetVal=object.ObjectIdToObject(ID)
RetVal:the entity object corresponding to ID
object:Document object
ID: the identifier of object
No Return Type