class
ScriptImagePoolObject.
ScriptImagePoolMarker
class
ScriptImagePoolObject.
ScriptImagePoolObject
Bases: ScriptImagePoolObject.ScriptImagePoolMarker
ScriptObjects which are an imagepool object are extended with this interface.
3.5.9.0
images
Gets the collection of the items currently configured within this imagepool.
download_only_used_images
Gets or sets a value whether all images or only the explicitly referenced ones should be downloaded to PLCs.
bool
imagepool_is_internal
Gets or sets a value whether this image pool is visible for projects embedding the current one as a library.
This is not relevant when working on a project itself.
bool
symboltextlist
Gets and sets the name of the text list for translation of the symbols in this image pool.
str
class
ScriptImagePoolObject.
ScriptImagePoolItems
Bases: list
Gets the current number of items in this image pool.
3.5.9.0
add
id
path
linktype
updateMode=None
Adds a new image to the current image pool.
id (str) -- The id to assign to the newly inserted image. Must not yet be existing.
path (str) -- The file path to reference by the new image item.
linktype (ImageLinkType) -- The way the new image item references the according file.
updateMode (AutoUpdateMode) -- The way the image item is updated automatically, relevant only if linktype is ImageLinkType.EmbeddedAndLinked
ArgumentException -- Thrown when an item with the according id already existings.
The newly created ScriptImagePoolItem.
remove
id
Removes the ScriptImagePoolItem with the given id.
id (param_type) -- description
KeyNotFoundException -- Thrown when no entry with the given id exists.
move
indexSrc
indexDst
Moves a ScriptImagePoolItem in the list of items.
indexSrc (int) -- The index of the item that should be moved.
indexDst (int) -- The index where the item should be located afterwards.
ArgumentOutOfRangeException -- Thrown when the given indices are out of range.
class
ScriptImagePoolObject.
ScriptImagePoolItem
Bases: object
An item (in fact like a line) within a ScriptImagePoolObject.
3.5.9.0
id
The identification of the image that can be accessed in the visualization too.
ArgumentException -- Thrown when the id is being set and the new id is already contained in the imagepool.
str
filepath
The path of the referenced image.
Relevant only if linktype yields ImageLinkType.Linked or ImageLinkType.EmbeddedAndLinked.
str
linktype
The way the image is referenced.
updatemode
The way the image is updated automatically while the project is open.
Relevant only if linktype yields ImageLinkType.EmbeddedAndLinked.
AutoUpdateMode
class
ScriptImagePoolObject.
ScriptImagePoolObjectContainer
Bases: object
Projects and Application Objects are extended with this interface since CoDeSys V3.5.9.0.
3.5.9.0
create_imagepool
name
Creates a new image pool object in the current context (either application or project global).
name (str) -- The name of the new imagepool object. In case of None, a default name will be generated.
ArgumentException -- Thrown when an image pool with the given name already exists within the current context.
The newly created imagepool object.
get_global_imagepool
Returns the global image pool object or creates a new one if not yet existing.
Typically this method can be called on projects only. Only in case of special customizations of the programming system, it is allowed to call this on an application too.
InvalidOperationException -- Thrown when called on applications when this is not allowed.
The global imagepool.
has_global_imagepool
Checks whether there is already a globalimagepool in the current location.
Only in case of special customizations of the programming system, it is allowed to call this on an application too.
InvalidOperationException -- Thrown when called on applications when this is not allowed.
bool
class
ScriptImagePoolObject.
ImageLinkType
Bases: enum.Enum
This enumeration represents the way an image is embedded or linked into a project.
3.5.9.0
Linked
= 1
This value means that the image is linked from the project only.
EmbeddedAndLinked
= 2
This value means that the image is embedded within the project while still linked to the according file in the filesystem and thus allowing automatic updates if changed on disk.
Embedded
= 3
This value means that the image is embedded within the project.