ISymbolInsert¶
- class ISymbolInsert¶
Bases:
IInsertEntity- Summary:
Represents a symbol insert entity.
Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance
- property angle¶
Gets Angle.
- Summary:
Sets and gets the rotated state of the insert.
- Returns:
The value of Angle.
- Return type:
angle (float)
- property block¶
Gets Block.
- Summary:
Returns an IBlock object representing the block that this entity is in.
- property drawing¶
Gets Drawing.
- Summary:
Returns an IDrawing object representing the drawing that this entity is in.
- property entity_type¶
Gets entity_type.
- Summary:
Indicates the type of entity.
- Remarks:
Once you know the type of the entity, you can access additional properties. See IAngleDimension, IAnnotationDimension, IArc, IBezier, IBlockInsert, IBorderPlotArea, ICentreDimension, IDimension, IGraphic, IInsertEntity, ILayerInsert, ILeaderDimension, ILine, ILinearDimension, IMasterLayerInsert, IRadiusDimension, IRubberEntity, ISymbolInsert, IText.
- Returns:
The value of entity_type.
- Return type:
- property extents¶
Gets Extents.
- Summary:
Returns an IRect object representing the extents of the entity.
- property geometric¶
Gets Geometric.
- Summary:
Determines if the entity is a geometric entity, i.e. the entity is a line, arc or bezier.
- Remarks:
This property is useful when iterating a list of entities to perform operations on only geometric entities.
- Returns:
The value of Geometric.
- Return type:
geometric (bool)
- property insert_type¶
Gets insert_type.
- Summary:
Indicates the type of insert.
- Returns:
The value of insert_type.
- Return type:
Examples:
- property inserted_block¶
Gets inserted_block.
- Summary:
Represents the IBlock object which represents the symbol within the active layer.
- Remarks:
It is usually more useful to use the inserted_object property, rather than this one. Introduced in Impact 8.0.0.51
- Returns:
The value of inserted_block.
- Return type:
- property inserted_object¶
Gets inserted_object.
- Summary:
Represents the ISymbol object for which this entity is an insertion.
- Returns:
The value of inserted_object.
- Return type:
- property matrix¶
Gets Matrix.
- Summary:
Sets and gets the transformation matrix used by the insert. (This matrix is equivalent to the Origin, Angle, Mirrored, and Scale properties.)
- Remarks:
Introduced in Impact 7.0.0.31.
Examples:
- property mirrored¶
Gets Mirrored.
- Summary:
Sets and gets the mirrored state of the insert.
- Returns:
The value of Mirrored.
- Return type:
mirrored (bool)
- property origin¶
Gets Origin.
- Summary:
Sets and gets the origin (point of insertion).
- property palette¶
Gets Palette.
- Summary:
Returns an IPalette object representing the palette of this entity.
- property scale¶
Gets Scale.
- Summary:
Sets and gets the scale.
- Returns:
The value of Scale.
- Return type:
scale (float)
- property secondary_palette¶
Gets secondary_palette.
- Summary:
Gets and sets the name of the secondary palette.
- Returns:
The value of secondary_palette.
- Return type:
secondary_palette (str)
- property selected¶
Gets Selected.
- Summary:
Indicates the selected state of the entity.
- Returns:
The value of Selected.
- Return type:
selected (bool)
- property stale¶
Gets Stale.
- Summary:
Use Stale to determine if the entity that this object describes still exists.
- Remarks:
An entity object may become “stale” when the underlying entity no longer exists. If Stale is TRUE then attempting to reference any other method or property of the object will cause an error.
- Returns:
The value of Stale.
- Return type:
stale (bool)
- property visible¶
Gets Visible.
- Summary:
Indicates whether an entity is currently visible.
- Remarks:
This is a read-only property. Any entity’s visibility is affected by factors such as its palette, its layer, its entity type, its block. Note that this property applies to the current window (equivalent to active_drawing.active_window). Introduced in Impact 8.0.0.74
- Returns:
The value of Visible.
- Return type:
visible (bool)
- copy()¶
- Summary:
Makes an identical copy of the entity.
- Remarks:
Note that the new entity goes into the same block as the original entity (not necessarily into the active block). See also copy_to_block method. Introduced in Impact 8.0.0.57
- copy_to_block(block)¶
- Summary:
Makes a copy of the entity, placing it into the specified block.
- Remarks:
Note that the entity’s location in block coordinates will remain constant, meaning that the entity might be moved in the layer (world coordinates). See also Copy method, which copies the entity within the same block. Introduced in Impact 8.0.0.73
- Parameters:
block (IBlock) – The destination block for the entity. This can be an IBlock or an IActiveBlock, allowing you to copy entities to the active sub-block of another layer.
Examples:
- delete()¶
- Summary:
Deletes the entity.
- Remarks:
You need to avoid deleting entities while iterating through a collection of entities, because Impact is likely to crash when trying to find the next entity in the collection. One trick is to step backwards through the collection, as shown in the example script. A better solution is to put the entity objects into another data structure, such as an array or array_list, and then iterate through that structure instead. After calling this method it is an error to access any of the properties (except Stale) or methods of the entity since the entity is “stale”. Prior to Impact 9.0.0.77, Impact would crash if you attempt to delete an entity which is not within the current block (active_block).
Examples:
- explode()¶
- Summary:
Explodes this entity into its component parts. Please do not use this method (see remarks).
- Remarks:
This method is no longer supported. Please use IActiveBlock.explode instead.
- Is(other_entity)¶
- Summary:
Compares this entity object with another one, to see if they actually represent the same entity.
- Remarks:
This method is not for comparing two entities which might be similar. If you copy an entity (using IEntity.copy, for example) then compare using this Is method, it will return False. Introduced in Impact 8.0.0.33.
- Returns:
True if the two objects refer to the same underlying entity.
- Parameters:
other_entity (IEntity) – The entity to be checked against this one.
Examples:
- isNone()¶
Checks if the COM object is None. This is useful for determining if the wrapper has been initialized with a valid COM object.
- point_on_side(point)¶
- Summary:
Determines the side of the entity a given point lies on.
- Remarks:
This method will only return valid results for entities with the following types: etLine etArc etBezier If the entity is not one of the above types then the result of this method will always be esUndefined.
- Returns:
One of the values from the enumeration ipEntitySide.
- Parameters:
point (IVector) – The point to query.