IEnquireLengths

class IEnquireLengths

Bases: ImpactCOMWrapperBase

Description:

The IEnquireLengths object is used to enquire about the lengths and extents of entities within a block.

Remarks:

This object operates on the IBlock that created it. The IBlock does not need to be active to use this object. The default IEnquireLengths object will recurse into sub-blocks, set the Recurse property to false to change this behaviour. Set the IEnquireLengths properties to specify the entities to enquire about and call the Perform method. The Length and Extents properties will contain the results. When determining the length and extents of the specified entities the scale of blocks and symbols within the block is taken into account.

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

property block_or_symbol_name

Gets block_or_symbol_name.

Description:

Specifies a block or symbol to enquire about.

Remarks:

You can restrict the entities included in the enquiry to only those contained in the block or symbol with the specified name. This is used for instance if you want to enquire about the length of all entities within a specific symbol that is inserted into in a block multiple times. If you set this property to a symbol name you should also set the include_entities_in_symbols property to true.

Returns:

The value of block_or_symbol_name.

Return type:

block_or_symbol_name (str)

property entity_types

Gets entity_types.

Description:

The entity types to get the lengths of.

Remarks:

You can specify an ipEntityType, or an array of ipEntityType. Only those entities matching this property are included in the enquiry. For example to enquire about all cut lines, set palette_types to ptCut and entity_types to etLine. Note that in VBScript, when clearing any value previously assigned to this property, you should assign it to Empty (not Nothing).

Returns:

The value of entity_types.

Return type:

entity_types (any)

property explode_text_entities

Gets explode_text_entities.

Description:

Specifies whether to explode text entities.

Returns:

The value of explode_text_entities.

Return type:

explode_text_entities (bool)

property extents

Gets Extents.

Description:

Read the extents of the entities after calling the Perform method.

Returns:

The value of Extents.

Return type:

extents (IRect)

property include_entities_in_symbols

Gets include_entities_in_symbols.

Description:

Specifies whether to include lengths of entities contained in symbols.

Returns:

The value of include_entities_in_symbols.

Return type:

include_entities_in_symbols (bool)

property length

Gets Length.

Description:

Read the length of entities after calling the Perform method.

Remarks:

The result contained in the Length property is the total length of all entities that matched properties of the IEnquireLengths object. If more than one IPalette was specified you can also examine the enquire_length property to determine the length of individual IPalettes making up this total.

Returns:

The value of Length.

Return type:

length (float)

property palette_types

Gets palette_types.

Description:

The palette types to get the lengths of.

Remarks:

You can specify an ipPaletteType, or an array of ipPaletteType. This property is used in conjunction with the rule_types property. Only IPalettes matching both the palette_types AND the rule_types are included in the enquiry. For example you can enquire about all entities with a zipper cut palette by setting palette_type to ptCut and rule_types to rtZipper. Note that in VBScript, when clearing any value previously assigned to this property, you should assign it to Empty (not Nothing).

Returns:

The value of palette_types.

Return type:

palette_types (any)

property palettes

Gets Palettes.

Description:

The palettes to get the lengths of.

Remarks:

You can specify a palette name, a single IPalette object or an array of IPalette objects. The palettes specified are always included in the enquiry, even if they don’t match the other properties such as palette_types and rule_types.

Returns:

The value of Palettes.

Return type:

palettes (any)

property recurse

Gets Recurse.

Description:

Specifies whether the enquiry recurses into ‘sub-blocks’ within the IBlock.

Remarks:

The default value is true.

Returns:

The value of Recurse.

Return type:

recurse (bool)

property rule_types

Gets rule_types.

Description:

The palette rule types to get the lengths of.

Remarks:

You can specify an ipRuleType, or an array of ipRuleType. This property is used in conjunction with the palette_types property. Only IPalettes matching both the palette_types AND the rule_types are included in the enquiry. For example you can enquire about all entities with a zipper cut palette by setting palette_type to ptCut and rule_types to rtZipper. Note that in VBScript, when clearing any value previously assigned to this property, you should assign it to Empty (not Nothing).

Returns:

The value of rule_types.

Return type:

rule_types (any)

property selected_entities_only

Gets selected_entities_only.

Description:

Specifies if only selected entities are considered.

Returns:

The value of selected_entities_only.

Return type:

selected_entities_only (bool)

property visible_entities_only

Gets visible_entities_only.

Description:

Specifies if only visible entities are considered.

Returns:

The value of visible_entities_only.

Return type:

visible_entities_only (bool)

perform()
Description:

Call the Perform method to calculate the Length and Extents result properties.

Remarks:

Use this method after setting the properties to control what to enquire about. The Length and Extents properties will contain the results of the enquiry.

Examples