Class Documentation Device DLL enUS
Class Documentation Device DLL enUS
Class: Device
Class: Implement
Class: InfoToCreateVE
Class: Message
Class: MessagePack
Public Enum
Enum uceSaveWireType
Enum emLabelRunType
Enum emLabelRunType
emcRunAsFirst = 0
' Calculating the label for the first time
emcRunAsNext = 1
emcNotRun = 3
Enum uceSaveWireType
Enum uceSaveWireType
If a cable is placed on a connection line that is deleted, the user can decide via
the shortcut menu whether or not the cable information should remain at the
affected objects.
uccSaveWireNone = 0
uccSaveWireOwn = 1
The wires and therefore the cable information is retained at its own connector.
uccSaveWirePartner = 2
The wires and therefore the cable information is retained at the partner connector.
If the wires are retained, the wire information is also visible in the terminal
strip editor and in the cable list.
Class: Device
Public Sub
Public Property
Public Functions
CDeviceChange
CheckByLocalCDevice
ConnectConnectors
ConnectionPossible
ContactFullName
ContactName
ControlTypeConverter
CopyObject
CreateDeviceObject
CreateDeviceObjectEx
CreateTemplate
CreateVE
DeleteConnectionForDevice
DeleteObject
DeviceNewByPrototype
DigitCountInName
DisconnectConnectors
DocumentAssume
DocumentsSearchAndAssume
ElementsCloseOrPaste
ElementsOrderByKoord
ElementsOrderByLabel
FirstNumberInString
GetCaptionForUnit
GetCDevicesByStructureGroup
GetCDevStruktCollection
GetChildsForNew
GetClassicTQBProgIdByControlType
GetComosObjectAcrossProjects
GetCObject
GetComosObject
GetConPossibleTable
GetControlType
GetDeviceByDocObj
GetDeviceLevel
GetIdentTextForComosObject
GetLabelWithVariable
GetMainDevice
GetStdControlType
GetTmpCollection
GetVlKpCollection
InheritCheckIn
IsControlTypeTopQueryBrowser
IsInheritCheckIn
IsMainDevice
IsImplementation
IsImplemented
IsObjectSystemRO
IsPropertyTranslatable
IsSetAllowed
IsSpecificationTranslatable
IsSpecInVisible
IsWriteAllowed
IsWriteAllowedByValue
LabelChangeStretch
LanguageDescription
LockedStatusText
MaxNumberInLabel
MaxNumberInLabels
MegaClass
NameMaske
NextForString
NextForStringLikeComos
NextNameForComosCollection
NextNameForDevice
NextNameLikeParameters
PasteObject
QueryXObjCreate
SearchDefaultCables
SearchOrIndexObject
SelectPointer
SetCableChannelForCable
SetImplementation
SetLabel
SetLocation
SetLock
SetName
SetObjectLabel
SetPointer
SetRunNumber
SetRunNumberForElement
SetSubObjbyCDevDesc
SetUnit
XObjInheritParent
AImportXObjCreate
Inactive
Parameter
Device
CDevice
CheckMasks
Is optional and defines if the mask entries for name and label should be checked.
Return value
CheckByLocalCDevice
Parameter
CDevice (IComosDCDevice)
ScreenMessages (Boolean)
CreateMessage (Boolean)
True: In case of an error the message is entered in the COMOS error list The error
list is displayed by means of "Check" or "Object test".
Return value
Return is a base object from the @Local branch of the current object. The base
object must have a base object pointer to the specified base object.
Error case: If several base objects with a reference exist under @Local, the return
value is empty. Depending on the settings a message is output as a MessageBox or a
DebugView output for the end user.
ConnectConnectors
Parameter
Connector1
Connector2
ScreenMessages
Return value
ConnectionPossible
Parameter
Connector1
ScreenMessages
Return value
-1
If it is an undefined error.
ContactFullName
Parameter
Connector (Object)
Device (Object)
Return
<Connector.AliasFullLabel>[ (<Owner_Object.Name>) ]
The part in brackets is optional and is only output under following basic
conditions:
ContactName
Parameter
Connector (Object)
Return
Returns the name of the specified connector as it is shown in the connector list.
ControlTypeConverter
Internal
CopyObject
Inactive
CreateDeviceObject
Parameter
Owner
CDevice
Name
Is optional and returns the name of the object.
Unit
Location
Return value
CreateDeviceObjectEx
Parameter
Owner
CDevice
Unit
Location
WithMsg
Return value
CreateTemplate
Parameter
Owner
CDevice
Is used in order to decide if the create option "Normal" or "Block" is used. This
parameter is only used if it is set.
Return value
CreateVE
Internal
Internal.
DeleteConnectionForDevice
Parameter
DeviceObject
ConnectorsLayer
Side
Optional. Is the connection side: Input, Output or all ("I", "O", "").
Return value
No
DeleteObject
Parameter
ObjectToDelete (Object)
IComosDDevice
or
The device possesses at least one element that is placed on at least one document.
IComosDDocObj
If the object exists and the rights are available, the DocObj is deleted.
Return value
DeviceNewByPrototype
The new engineering object which is created has the same base object, the same unit
pointer, the same location pointer and the same specification values as the
prototype.
DeviceNewByPrototype(ByVal Prototype As IComosDDevice) As IComosDDevice
Parameter
Prototype
Return value
DigitCountInName
Inactive
DisconnectConnectors
Parameter
CurrentConnector
Is the connection.
PartnerCon
SaveWireType
Optional. Defines if also the wires that are part of the connection are supposed to
be dissolved.
Return value
DocumentAssume
Inactive
Parameter
OwnerObject (IComosBaseObject)
Document packages
DVM documents
A new document is always created. The function is called recursively for the
documents under the new document.
The document is created under the new owner by inserting the template.
DocumentsSearchAndAssume
Parameter
Device
No
ElementsCloseOrPaste
Inactive
ElementsOrderByKoord
Sorts elements
Parameter
CurrentDevice (Object)
XY
YX
Reassignment of the names and identifiers in accordance with the old order of the
names
ElementsOrderByLabel
Sorts elements
CurrentDevice (Object)
Reassignment of the names and identifiers in accordance with the old order
FirstNumberInString
Parameter
CurrentString (String)
The string to be examined
GetCaptionForUnit
Parameter
CurObject (IComosBaseObject)
Supported types:
IComosDDevice
IComosDDocument
Determines the GUnit-Pointer of the object specified through CurObject and returns
the description of its class from the class list.
Requirement:
The object found through GUnit has one of the following classes:
Position
Function
FunctionElement
Signal
GetCDevicesByStructureGroup
Parameter
CDevice (IComosDCDevice)
Requirement:
GetCDevStruktCollection
Internal
Internal
GetChildsForNew
Parameter
Owner (Object)
IComosDCDevice
VBA.Collection
IComosDCollection
CDevice
Only internally.
WithSubsFromBlock
Only internally. Defines if the elements of the create option "Block" are
considered.
IgnoreCheckTplLayer (optional)
Only internally.
Calls the GetChildsForNewOne routine for all specified objects. Finally the
function returns possible base objects for the creation of new objects underneath a
given owner
Return value
GetClassicTQBProgIdByControlType
Internal
GetComosObjectAcrossProjects
Returns an object
Parameter
WorkSet (IComosDWorkset)
SystemUID (String)
SystemType (Long)
PathFullName (String)
SearchAcrossProjects (Boolean)
The following applies additionally: If the object is not found in the current
project, it is searched for by using the PathFullName in the base project and
system project. Prerequisite is that the object has one of the following system
types:
CDevice
StandardTable
StandardValue
GetCObject
Parameter
ComosObject
SystemTypeDevice
SystemTypeUnit
SystemTypeLocation
SystemTypeCDevice
SystemTypeProject
SystemTypeDocument
Return value
GetComosObject
Parameter
WorkSet
SystemUID
SystemType
PathFullName
GetConPossibleTable
xxx
Parameter
Connector (IComosDConnector)
GetControlType
Parameter
ComosObj (IComosBaseObject)
Supplies the ControlType (ProgID) for the specified COMOS object. The ControlType
is visible and can be changed in the properties of the base object. The types
IComosDDevice and IComosDCDevice are approved.
GetDeviceByDocObj
Parameter
DocObjObject
GetDeviceLevel
Parameter
CurrentDevice
GetIdentTextForComosObject
Parameter
ComosObject
Return value
GetLabelWithVariable
Inactive
GetMainDevice
GetStdControlType
Internal
GetTmpCollection
Converts the first parameter regardless of type into IComosDCollection
Parameter
ComosObjects
Can be one or more COMOS objects. Following types are supported: IComosBaseObject,
VBACollection, IComosDCollection.
STypes
Return value
GetVlKpCollection
Inactive
Parameter
ComosObject
ShowMessage
CreateMessage
Return value
IsControlTypeTopQueryBrowser
ComosObj (IComosBaseObject)
Returns whether the ControlType (ProgID) of the COMOS object contains the
TopQBrowser type..
IsInheritCheckIn
Parameter
ComosObject
Return value
IsMainDevice
Checks if an entered object is a main object (MainDevice)
Parameter
CurrentDevice
Return value
IsImplementation
Parameter
ComosObject
Request
IsImplemented
Parameter
curObj
Return value
IsObjectSystemRO
Parameter
ComosObject
Return value
IsPropertyTranslatable
Parameter
ComosObj (IComosBaseObject)
PropName (String)
PropParameter (Variant)
The function is called when texts are loaded in the Single translation or Bulk
translation. Functions only for attributes of the type Text.
Return values
Empty string
Error message
IsSetAllowed
Parameter
ComosObject
PointerObj
PropName
The name of the property. Following properties are supported:
CDevice
Cobject
Location
Unit
Alias
Implementation
Link.Object
StandardTable
Signal
Potential
Connected with
Wire
WithMsg
Is optional and defines that the error message are written in an own message pack.
Return value
IsSpecificationTranslatable
Inactive
IsSpecInVisible
Parameter
ComosObj (Variant)
Return values
True
False
The object is not visible or the system class of the checked object is not
IComosDSpecification.
IsWriteAllowed
Checks if you can change value type properties for a COMOS object
Parameter
ComosObject
WithMsg
PropName
Return value
IsWriteAllowedByValue
Parameter
ComosObject
WithMsg (optional)
PropName (optional)
PropParameter (optional)
Checks whether the specified property of the specified COMOS object can be edited
and returns an error message in case of a negative result. In the check for write
protection the following reasons are considered:
Function rights
Status for the object states "Object locking" and "System object"
Return value
LabelChangeStretch
Internal
LabelChangeStretch ( ByVal CurElement as Object, ByVal NewLabel as String ) as
Variant
LanguageDescription
Parameter
Language
Index
Return value
LockedStatusText
Returns a text which states why the property of an object is protected
Parameter
ComosObject
PropName
PropParameter
Return value
The status text which is displayed in the status bar of the application.
MaxNumberInLabel
Inactive
MaxNumberInLabels
Inactive
MegaClass
Internal
Allocation of types according to the old scheme to classes according to the new
scheme.
NameMaske
Internal
NextForString
Internal
NextForStringLikeComos
Internal
NextNameForComosCollection
Internal
NextNameForComosCollection ( ByVal ComosCollection as Object, ByVal OrigName as
String, Optional ByVal IsStart as Boolean, Optional ByVal ComosObject as Object )
as String
NextNameForDevice
Name calculation
Parameter
Device (IComosDDevice)
Calculates the new name for the specified device object. The name calculation
considers the following specifications:
If a mask is defined, it takes priority. The new name is determined by the mask.
If no mask exists, the name is formed on the basis of the "Virtual" setting:
The "Virtual" setting is on: As many ? are entered in the name as the number of
positions in the "Virtual" setting. This case is rare.
NextNameLikeParameters
Name calculation
Returns NextName and in the process takes the setting from Project.Parameters into
consideration. Amongst other points Project.Parameters specifies how many digits
are contained in the name.
PasteObject
Inactive
Parameter
OwnerObject (Object)
DeviceObject (Object)
Creates a copy of the specified object under the owner and returns the newly
created object.
QueryXObjCreate
Inactive
SearchDefaultCables
xxx
SearchOrIndexObject
Parameter
CurrentObject (IComosBaseObject)
Return values
Parameter
ComosObject
PropName
WithMsg
Cancel
Return value
SetCableChannelForCable
xxx
SetImplementation
Parameter
Request
Implementation
WithMsgByReplace
Return value
SetLabel
Parameter
ComosObject
NewLabel
WithMsg
Return value
SetLocation
Parameter
ComosObject
PointerObj
WithMsg
Return value
SetLock
Parameter
ComosObj
Is a engineering object or a document.
vNewValue
Recursive
Non-recursive
Recursive
WithMsg
SetName
Parameter
ComosObject
NewName
WithMsg
Return value
SetObjectLabel
Inactive
SetPointer
Checks if a pointer can be set and sets the pointer if the check was successful
Parameter
ComosObject
PointerObj
PropName
CDevice
CObject
CDocument
Location
Unit
Alias
Implementation
Link.Object
StandardTable
Signal
Potential
ConnectedWith
Wire
Cable
WithMsg
Return value
SetRunNumber
Internal
SetRunNumberForElement
Obsolete
Calculation of identifiers.
SetSubObjbyCDevDesc
Parameter
DeviceOwner (IComosBaseObject)
DeviceName (String)
CDeviceDescription (String)
A search is carried out for an element called DeviceName below the DeviceOwner
object.
Element exists: Base holder pointer is processed as described in the following step
A search is carried out for a base object in the base data in accordance with
CDeviceOwnerFullname and CDeviceDescription.
SetUnit
ComosObject
PointerObj
WithMsg
Return value
XObjInheritParent
Parameter
XObjContainer (IComosBaseObject)
Determines the base object that is the inherit source of XObject for the specified
COMOS object. Supported types: IComosDCDevice, IComosDDevice.
In Section Instructions Examples Basics History Extra
Public Sub
CheckDocumntsAfterCDeviceChange
CheckElementsAfterCDeviceChange
Parameter
Device (IComosDDevice)
The COMOS object of the Device system type whose base object was changed
CDeviceOld (IComosDCDevice)
The routine carries out a base object change for each old element of the device to
the respectively new element base object. In the process dereferenced elements
(last stage of referencing) are also taken into consideration at the new elements
provided the dereferencing setting is set at the element.
Exception: A change does not take place at elements with the Block, Group and
Structure creation mode. Here, the project option "Behavior of elements at base
object exchange" is evaluated. There are two cases depending on this project
option:
Element is imported from the old base object if identical names exist and it is not
a virtual element.
CheckDocumntsAfterCDeviceChange
Parameter
Device (IComosDDevice)
The COMOS object of the Documennt system type whose base object was changed
CDeviceOld (IComosDCDevice)
After a base object exchange the routine check the status for each document of the
device.
Name of the document is the same at the old and new base object: The document is
retained.
All other documents: The documents are entered in the ErrorObjects list. The user
decides what is to happen with the documents in the error list.
In Section Instructions Examples Basics History Extra
Public Property
ITC_SYSCATEGORIE
ITC_SYSSHIELD
CurrentMessagePack
MaxRunLevels
AllowMultipleRequests
AllowMultipleRequests ( ) as Boolean
The property controls whether several requests can be set at the implementation
pointer of a device.
ITC_SYSCATEGORIE
Internal
ITC_SYSCATEGORIE ( ) as String
Internal constant.
ITC_SYSSHIELD
Internal
ITC_SYSSHIELD ( ) as String
Internal constant.
CurrentMessagePack
CurrentMessagePack ( ) as Object
MaxRunLevels
Internal
MaxRunLevels ( ) as Integer
Internal.
Class: Implement
Public Functions
Public Subs
Implement Properties
ITC_RequestInfo
ITC_RequestInfo ( ) as String
Internal.
Public Functions
This chapter contains the following information:CheckConnectors
CheckSpecificationsValue
DisconnectOldRequest
EnableRestore
InfoText
IsEnabledRestoreRequest
IsUsedAsImplementation
IsUsedAsRequest
CheckConnectors
Parameter
DeviceFrom
DeviceTo
ConnectorType
Check is OK.
CheckSpecificationsValue
Parameter
DeviceFrom
SpecNestedName
Return value
11
12
DisconnectOldRequest
Dissolves an implementation
Parameter
Implementation
Is an engineering object.
Return value
EnableRestore
Parameter
Implementation
Request
Return value
Parameter
NumberCode
Return value
Information text.
IsEnabledRestoreRequest
Parameter
Implementation
Return value
Is "True" if the operation was successful.
IsUsedAsImplementation
Parameter
Device
Return value
IsUsedAsRequest
Device
Return value
Public Subs
MoveConnectorsInfo
MoveDocObjs
MoveSpecificationLinks
SetUnit
CopySpecificationsValue
DeviceFrom
DeviceTo
SpecNestedName
Prio
MoveConnectorsInfo
Parameter
DeviceFrom
DeviceTo
The engineering object to which the values are passed to.
ConnectorType
Prio
Recursive
Defines if the new values should also be applied to the connected connections.
MoveDocObjs
Parameter
DeviceFrom
DeviceTo
DocumentTypeName
The name of the document type.
SymbolType
MoveSpecificationLinks
Parameter
DeviceFrom
DeviceTo
SetUnit
Parameter
DeviceFrom
DeviceTo
Class: InfoToCreateVE
Internal
Management class for virtual elements. This class controls whether the elements are
also automatically created when a new device is created or not.
Class: Message
Overview
This class creates objects of the type "Message". These objects are used by the
class MessagePack. See chapter Class: MessagePack.
The properties of this class are displayed later in the object test.
In Section Instructions Examples Basics History Extra
Class: MessagePack
Overview
If errors are found in COMOS, two procedures are available to report these errors
to the user:
or
The errors are collected and displayed as an error package after the procedure is
finished.
The errors in the error package can, for example, be listed in a table or displayed
in the object test. This procedure is recommended for mass operations.
Since different GUIs generate diffferent messages, each GUI has to generate, fill
out and subsequently display its own MessagePack.
Example 1
The end user carries out a base object exchange via the properties mask. Since this
operation is only carried out once, the properties mask does not require the
MessagePack technique an can display a MessageBox directly in case of an error.
Example 2
The end use carries out a base object exchange for several objects simultaneously
via the query user interface. Since the base object exchange is carried out several
times in this case, the QueryBrowser decides in the case of an error to collect all
the messages and display them a single time at the end. To this purpose it uses the
MessagePacks of the Device.dll.