IRubberEntity

class IRubberEntity

Bases: IEntity

Summary:

Represents a rubber entity.

Wraps a COM object or another wrapper instance. Accepts: - A valid impact_object - An existing impact_com_wrapper_base-derived instance

property angle_at_end

Gets angle_at_end.

Summary:

Gets or sets the angle at the end of the rubber entity.

Remarks:

Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of angle_at_end.

Return type:

angle_at_end (float)

property angle_at_start

Gets angle_at_start.

Summary:

Gets or sets the angle at the start of the rubber entity.

Remarks:

Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of angle_at_start.

Return type:

angle_at_start (float)

property bevel_side

Gets bevel_side.

Summary:

Determines the orientation of the profile rubber entity.

Remarks:

The returned bevel side is the profiled side of the profile rubber in the same running direction as the original cut entity. Introduced in Impact 12.0.0.160

Returns:

The value of bevel_side.

Return type:

bevel_side (ipBevelSide)

property block

Gets Block.

Summary:

Returns an IBlock object representing the block that this entity is in.

Returns:

The value of Block.

Return type:

block (IBlock)

property cut_length

Gets cut_length.

Summary:

Gets the length of the rubber entity accounting for offsets and angles

Remarks:

This is the length of the profile rubber along the centre of the piece, angles and offsets applied. Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of cut_length.

Return type:

cut_length (float)

property drawing

Gets Drawing.

Summary:

Returns an IDrawing object representing the drawing that this entity is in.

Returns:

The value of Drawing.

Return type:

drawing (IDrawing)

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:

entity_type (ipEntityType)

property extents

Gets Extents.

Summary:

Returns an IRect object representing the extents of the entity.

Returns:

The value of Extents.

Return type:

extents (IRect)

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 length

Gets Length.

Summary:

Gets or sets the length of the rubber entity.

Remarks:

This is the length of the entity, to get the length including the offset reductions use cut_length instead. Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of Length.

Return type:

length (float)

property offset_at_end

Gets offset_at_end.

Summary:

Gets or sets the distance offset at the end of the rubber entity.

Remarks:

Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of offset_at_end.

Return type:

offset_at_end (float)

property offset_at_start

Gets offset_at_start.

Summary:

Gets or sets the distance offset at the start of the rubber entity.

Remarks:

Introduced in Impact 12.0.0.143 and Impact 11.1.2.3

Returns:

The value of offset_at_start.

Return type:

offset_at_start (float)

property palette

Gets Palette.

Summary:

Returns an IPalette object representing the palette of this entity.

Returns:

The value of Palette.

Return type:

palette (IPalette)

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.

transform(matrix)
Summary:

Apply a transformation matrix to the entity.

Remarks:

Introduced in Impact 7.0.0.31.

Parameters:

matrix (IMatrix) – The matrix to be applied.

Examples: