Impact Objects

The Impact object model corresponds closely to what you see in the Impact user interface. The description below mirrors the original help text; links now point to the Python COM wrappers.

Impact

An IDrawing object represents an open drawing and the full_name property is its name. Each IDrawing has a layers property which references an ILayers collection of ILayer objects. Each ILayer has properties such as full_name (VBScript FullName), description and layer_type. It also has an active_block property which references an IActiveBlock object and an active_palette property which references an IPalette object. The IActiveBlock object has methods for creating new entities, selecting entities and manipulating selected entities. When you create a new entity, you are usually returned an IEntity object representing the new entity.

Each ILayer also has a blocks property which returns an IBlocks collection that represents all the used blocks in this layer. Each IBlock has properties such as full_name (VBScript FullName), block_type (VBScript BlockType) and active. It also has an entities property which references an IEntities collection of IEntity objects. Each IEntity has properties such as entity_type, palette (an IPalette object), selected (a boolean) and block (an IBlock object). Depending on the entity’s type, you may also reference members of entity objects such as ILine, IArc, IBezier, IGraphic, IDimension, IInsertEntity, and so on.

Each IDrawing object has a palettes property which returns an IPalettes collection of IPalette objects. Each IPalette object has properties such as full_name (VBScript FullName), palette_type (VBScript PaletteType), rule_type (VBScript RuleType), colour (VBScript Colour) and so on. You may use the methods of an IPalettes collection to find, add or delete palettes. Each ILayer object has a used_palettes property which returns an IPalettes collection.

The Application object has a drawings property which returns an IDrawings collection of IDrawing objects, representing all the open drawings. It also has an active_database property which references an IDatabase object plus a databases property which returns an IDatabases collection of IDatabase objects. Each IDatabase object represents a database connection which has been defined on the workstation. You may use the IDatabase object to access the project, template and symbol folders, search for drawings, find customer information, find user information and so on.

Each drawing in the database is represented by an IDatabaseItem object, with properties such as reference, code, drawing_type, folder (an IFolder object), customer (an ICustomer object). An IDatabaseItem object has methods for opening, renaming, deleting and so on. An IDatabaseItem object has a drawing property (an IDrawing object) which is None if the drawing is not open. Similarly an IDrawing object has a database_item property (an IDatabaseItem) which is None if the drawing has not yet been saved in the database.

The Application object has a system property which returns an ISystem object which can be used to obtain information such as the Impact version number and licence attributes.

Impact nServer

nServer support for Python is not implemented at this time.

See Also