You are on page 1of 59

WinCC 3D Control

Basics 1

Object properties 2

Dynamization 3
SIMATIC HMI

WinCC V8.0
WinCC 3D Control

System Manual

05/2023
A5E52671436-AA
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
indicates that minor personal injury can result if proper precautions are not taken.

NOTICE
indicates that property damage can result if proper precautions are not taken.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation, in particular its warning notices and safety instructions.
Qualified personnel are those who, based on their training and experience, are capable of identifying risks and
avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be complied with. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of Siemens AG. The remaining trademarks in this publication
may be trademarks whose use by third parties for their own purposes could violate the rights of the owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG Document order number: Printout of the Online Help Copyright © Siemens AG 2023.
Digital Industries Ⓟ 05/2023 Subject to change All rights reserved
Postfach 48 48
90026 NÜRNBERG
GERMANY
Table of contents

1 Basics ..................................................................................................................................................... 5
2 Object properties ................................................................................................................................... 9
2.1 Display in design mode ........................................................................................................ 9
2.2 Properties.AutoLoad (Properties_AutoLoad) ......................................................................... 9
2.3 Properties.DisableUserClick (Properties_DisableUserClick) ..................................................... 9
2.4 Properties.EnableBackground (Properties_EnableBackground) ............................................ 10
2.5 Properties.EnableMouse3D (Properties_EnableMouse3D) ................................................... 10
2.6 Properties.Mode (Properties_Mode) ................................................................................... 10
2.7 Properties.SceneFile (Properties_SceneFile) ........................................................................ 11
3 Dynamization....................................................................................................................................... 13
3.1 Events ............................................................................................................................... 13
3.1.1 Events for dynamization .................................................................................................... 13
3.2 Methods ............................................................................................................................ 14
3.2.1 Methods ............................................................................................................................ 14
3.2.2 AttachObjectExt ................................................................................................................. 16
3.2.3 DetachObjectExt ................................................................................................................ 17
3.2.4 GetCameraExt method ....................................................................................................... 18
3.2.5 GetJointHighLimitExt method ............................................................................................ 19
3.2.6 GetJointListExt method ...................................................................................................... 20
3.2.7 GetJointLowLimitExt method ............................................................................................. 21
3.2.8 GetJointValueExt method................................................................................................... 22
3.2.9 GetKinematicPoseExt method ............................................................................................ 23
3.2.10 GetKinematicsList method ................................................................................................. 24
3.2.11 GetObjectBlinkExt method ................................................................................................. 25
3.2.12 GetObjectFrameExt method ............................................................................................... 26
3.2.13 GetObjectFrameRelExt method .......................................................................................... 27
3.2.14 GetObjectListExt method ................................................................................................... 28
3.2.15 GetObjectMaterialColorExt method .................................................................................... 29
3.2.16 GetObjectMaterialCountExt method ................................................................................... 30
3.2.17 GetObjectPositionExt method ............................................................................................ 31
3.2.18 GetObjectPropertyExt method............................................................................................ 32
3.2.19 GetObjectRotationExt method............................................................................................ 33
3.2.20 GetObjectScaleExt method................................................................................................. 34
3.2.21 GetObjectShadowExt method ............................................................................................ 35
3.2.22 SetCameraDataExt method ................................................................................................ 36
3.2.23 SetCameraExt method ....................................................................................................... 38
3.2.24 SetCameraPositionExt method ........................................................................................... 39
3.2.25 SetCameraRenderTypeExt method ..................................................................................... 40
3.2.26 SetJointValueExt method ................................................................................................... 41
3.2.27 SetKinematicPoseExt method ............................................................................................. 42
3.2.28 SetKinematicsListExt method ............................................................................................. 44

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 3
Table of contents

3.2.29 SetObjectBlinkExt method.................................................................................................. 45


3.2.30 SetObjectFrameExt method ............................................................................................... 46
3.2.31 SetObjectFrameRelExt method ........................................................................................... 47
3.2.32 SetObjectMaterialColorExt method .................................................................................... 48
3.2.33 SetObjectPositionExt method ............................................................................................. 49
3.2.34 SetObjectPropertyExt method ............................................................................................ 50
3.2.35 SetObjectRotationExt method ............................................................................................ 51
3.2.36 SetObjectScaleExt method ................................................................................................. 52
3.2.37 SetObjectShadowExt method ............................................................................................. 53
3.3 Data types ......................................................................................................................... 54
3.3.1 Data types (output)............................................................................................................ 54
Index .................................................................................................................................................... 59

WinCC 3D Control
4 System Manual, 05/2023, A5E52671436-AA
Basics 1
Introduction
The WinCC 3D Control is a 3D Control that can be configured and dynamized
in a variety of ways.
With the Control, you load, view and manipulate the 3D models in Runtime.
The following functions are available:
• Loading a model
• Reading out the model structure
• Camera control
• Reading out and editing properties
• Positioning and scaling of objects
• Reading out and editing the color of objects
• Kinematics (only for Collada models)
• Ray casting event when clicking

Supported formats
The WinCC 3D Control supports 3D models of the following formats:

3DM 3DS 3MF AMF DAE DRC


FBX GCODE GLTF IFC KMZ LWO
MD2 MDD MPD NRRD OBJ PCD
PDB PLY PRWM STL SVG TILT
USDZ VOX VTK WRL XYZ

In addition, export files in JSON format that are generated in Explore mode are supported.

Dynamization
The WinCC 3D Control offers extensive options for dynamization:
• Specific methods
• Events
• Data types
Detailed information on this is available under "Dynamization (Page 13)".

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 5
Basics

Display modes
The following display modes for loading the mode are available in the WinCC 3D Control:
• Runtime mode
The Runtime mode is used for simple viewing and manipulating of the model.
• Explore mode
In Explore mode, the model is loaded in a 3D editor with comprehensive setting and
manipulation options.
In this mode you determine the parameters you need for the method call. For example,
you read object names or the camera position to obtain suitable values for the scripting.
The display mode is selected in the object properties via the attribute "Properties.Mode".

Loading a model
The following options are available to load a model:
• From a web server
To load the model from a web server enter the URL of the model as the value.
• From the project folder
To load the model from the project folder, enter the file name of the model as the value.
Ensure that the model is located in the "GraCS" folder of the project folder.
The model is selected in the object properties via the "Properties.SceneFile" attribute.

Camera control
The methods for camera control can be used to move, rotate and read out the camera.
The camera settings specify, for example, frustum, field of view or zoom.
In addition, you select the render type of the camera:
• Mesh: Rendering as mesh with material colors
• Wireframe: Rendering as a wireframe model with material colors
• Siemens: Rendering as a single-color model with settings for color, transparency,
and opacity
• SiemensWired: Rendering as a two-color wireframe model with filled surfaces and
setting options for color (surfaces and wireframe), transparency, and opacity.

WinCC 3D Control
6 System Manual, 05/2023, A5E52671436-AA
Basics

Kinematics
With the kinematics methods, you can read out pre-defined joints from the model and
manipulate multiple jobs simultaneously.
You define the desired motion and motion time.
The kinematic functions are only available for Collada models.

Ray casting
By default, when you click inside the displayed scene in Runtime, a ray casting event
is triggered. You can evaluate the results of the event via the event "OnMouseUp"
and the associated data type "EventData".
You select the ray casting behavior in the object properties via the
"Properties.DisableUserClick" attribute.

See also
Dynamization (Page 13)

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 7
Basics

WinCC 3D Control
8 System Manual, 05/2023, A5E52671436-AA
Object properties 2
2.1 Display in design mode
Display in design mode
The attribute "Display in design mode" specifies the display of the WinCC 3D Control in the
Graphics Designer.

On The 3D model assigned in the attribute "Properties.SceneFile" is displayed


in the Graphics Designer as a preview.
Off The 3D model assigned in the attribute "Properties.SceneFile" is not displayed
in the Graphics Designer. The Control is only displayed as a placeholder.

The "Display in design mode" attribute cannot be dynamized.

2.2 Properties.AutoLoad (Properties_AutoLoad)


Properties.AutoLoad (Properties_AutoLoad)
The attribute "Properties.AutoLoad" specifies whether a 3D model assigned in
WinCC 3D Control is loaded automatically.

Yes Model is loaded automatically.


No Model is not loaded automatically.

The "Properties.AutoLoad" attribute can be dynamized with the name "Properties_AutoLoad".

2.3 Properties.DisableUserClick (Properties_DisableUserClick)


Properties.DisableUserClick (Properties_DisableUserClick)
The attribute "Properties.DisableUserClick" specifies the behavior of the WinCC 3D Control
in Runtime if you click in a scene.

Yes Functions are disabled when clicking in the scene.


No A ray casting event is triggered when clicking in the scene.
Individual objects of the 3D model can be selected.

The "Properties.DisableUserClick" attribute can be dynamized with the name


"Properties_DisableUserClick".

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 9
Object properties
2.4 Properties.EnableBackground (Properties_EnableBackground)

2.4 Properties.EnableBackground (Properties_EnableBackground)


Properties.EnableBackground (Properties_EnableBackground)
In WinCC 3D Control, the attribute "Properties.EnableBackground" activates or deactivates
a global illumination for the scene in Runtime.
The attribute is used to illuminate scenes that do not have their own illumination definition.
If the scene has its own illumination definition, set the attribute to "No".

Yes Global illumination is activated.


No Global illumination is deactivated.

The attribute "Properties.EnableBackground" can be dynamized with the name


"Properties_EnableBackground".

2.5 Properties.EnableMouse3D (Properties_EnableMouse3D)


Properties.EnableMouse3D (Properties_EnableMouse3D)
The "Properties.EnableMouse3D" attribute activates or deactivates the control for a
3D mouse.
This function is not supported in the current WinCC version.

Yes 3D mouse control is activated.


No 3D mouse control is deactivated.

The "Properties.EnableMouse3D" attribute can be dynamized with the name


"Properties_EnableMouse3D".

2.6 Properties.Mode (Properties_Mode)


Properties.Mode (Properties_Mode)
The attribute "Properties.Mode" specifies in a WinCC 3D Control the display mode in which a
3D model is loaded.

0-Runtime The model is loaded in Runtime mode.


The mode is used for viewing the model.
1-Explore The model is loaded in Explore mode.
In this mode, the model is displayed in a 3D editor with extensive setting and
manipulation possibilities.
The mode is used to read out parameters for the method call.

The "Properties.Mode" attribute can be dynamized with the name "Properties_Mode".

WinCC 3D Control
10 System Manual, 05/2023, A5E52671436-AA
Object properties
2.7 Properties.SceneFile (Properties_SceneFile)

2.7 Properties.SceneFile (Properties_SceneFile)


Properties.SceneFile (Properties_SceneFile)
The attribute "Properties.SceneFile" links a 3D model with the WinCC 3D Control.
A file name or the URL of a web server can be specified as the value.
If you specify a file name, the file must be located in the "GraCS" folder of the
project directory.
The "Properties.SceneFile attribute can be dynamized with the name "Properties_SceneFile".

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 11
Object properties
2.7 Properties.SceneFile (Properties_SceneFile)

WinCC 3D Control
12 System Manual, 05/2023, A5E52671436-AA
Dynamization 3
3.1 Events

3.1.1 Events for dynamization

Overview
The following Control-specific events can be used for the dynamization:

Event Trigger
OnStart Loading the model is ready.
OnPlaying Runtime mode is active.
OnTrace Specific events, for example, starting the Control or loading a model
Can be used to receive information and search for errors.
OnUIEvent UI events, for example, mouse or keyboard input
OnSetCameraRenderType Render type of the camera has been changed.
OnSetCameraPosition Position of the camera has been changed.
OnMouseUp Clicking took place in the scene.
OnMouseUpExt Clicking took place in the scene.

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 13
Dynamization
3.2 Methods

3.2 Methods

3.2.1 Methods

Overview
Methods of the WinCC 3D Control, which are applied to individual objects, can be used to
trigger the different actions for the display or manipulation of a 3D model.

Specific methods of the WinCC 3D Control in VBS

Method Function
AttachObjectExt (Page 16) Assign an object to a superordinate object
DetachObjectExt (Page 17) Separate an object from the superordinate object
GetCameraExt (Page 18) Output the camera with its properties
GetJointHighLimitExt (Page 19) Output the upper limit for the position of a joint
GetJointListExt (Page 20) Output a list of all joints of a kinematics
GetJointLowLimitExt (Page 21) Output the lower limit for the position of a joint
GetJointValueExt (Page 22) Output the position of a joint
GetKinematicsList (Page 24) Output the kinematics list of an object
GetKinematicPoseExt (Page 23) Output the positions of all joints of a kinematics
GetObjectBlinkExt (Page 25) Output the flash status of an object
GetObjectFrameExt (Page 26) Output the matrix for the absolute geometric description
of an object
GetObjectFrameRelExt (Page 27) Output the matrix for the relative geometric description
of an object
GetObjectListExt (Page 28) Output the object list of a scene
GetObjectMaterialColorExt (Page 29) Output the color of an object
GetObjectMaterialCountExt (Page 30) Output the material quantity of an object
GetObjectPositionExt (Page 31) Output the position of an object
GetObjectPropertyExt (Page 32) Output the properties of an object
GetObjectRotationExt (Page 33) Output the rotation of an object
GetObjectScaleExt (Page 34) Output the scaling of an object
GetObjectShadowExt (Page 35) Output the shadow settings of an object
SetCameraDataExt (Page 36) Customize the camera settings
SetCameraExt (Page 38) Modify the camera position and camera settings
SetCameraPositionExt (Page 39) Modify the camera position and rotate the view
SetCameraRenderTypeExt (Page 40) Modify render type
SetJointValueExt (Page 41) Modify the position of a joint
SetKinematicsListExt (Page 44) Modify the kinematics list
SetKinematicPoseExt (Page 42) Modify the position of the joints of a kinematics
SetObjectBlinkExt (Page 45) Modify the flash status of an object
SetObjectFrameExt (Page 46) Modify the matrix of the absolute geometric description
of an object

WinCC 3D Control
14 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

Method Function
SetObjectFrameRelExt (Page 47) Modify the matrix of the relative geometric description
of an object
SetObjectMaterialColorExt (Page 48) Modify the color of an object
SetObjectPositionExt (Page 49) Move an object
SetObjectPropertyExt (Page 50) Modify the properties of an object
SetObjectRotationExt (Page 51) Rotate object
SetObjectScaleExt (Page 52) Scale object
SetObjectShadowExt (Page 53) Modify the shadow settings of an object

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 15
Dynamization
3.2 Methods

3.2.2 AttachObjectExt

Function
Adds a subordinate object to a superordinate object in WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.AttachObjectExt(keyParent As String, keyChild As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
keyParent Superordinate object
keyChild Subordinate object

Example
The example adds the subordinate object "object_211" to the superordinate object
"parts/4213.dat" and outputs a confirmation message.

'VBS386
Dim obj
Set obj = ScreenItems("cwc1").AttachObjectExt("parts/4213.dat", "object_211")
HMIRuntime.Trace "Executed " & "AttachObjectExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
16 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.3 DetachObjectExt

Function
Separates an object from its superordinate object in the WinCC 3D Control and returns
the type "GenericResponse".

Syntax
Expression.DetachObjectExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
Separates the object "object_211" from its superordinate object and outputs
a confirmation message.

'VBS387
Dim obj
Set obj = ScreenItems("cwc1").DetachObjectExt("object_211")
HMIRuntime.Trace "Executed " & "DetachObjectExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 17
Dynamization
3.2 Methods

3.2.4 GetCameraExt method

Function
Returns the camera with its properties in the WinCC 3D Control as the type
"GetCameraResult".

Syntax
Expression.GetCameraExt(id As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
id ID designation of the camera
The function is still in development.
Currently only the standard camera can be used.

Example
The example outputs the properties of the standard camera.

'VBS388
Dim obj
Set obj = ScreenItems("cwc1").GetCameraExt("")
HMIRuntime.Trace "Executed " & "GetCameraExt" & vbCrLf & " Returned obj With type " &
VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Type: " & obj.type & ", Fov: " & obj.fov & ", Near: " & obj.near &
", Far: " & obj.far & ", Focus: " obj.focus & ", Aspect: " obj.aspect & ", Zoom: "
& obj.zoom
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
18 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.5 GetJointHighLimitExt method

Function
Returns the upper limit for the position value of a joint of a kinematics in the
WinCC 3D Control as the type "GetJointValueResult".

Syntax
Expression.GetJointHighLimitExt(kinematicKey As String, jointKey As
String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
jointKey Joint name

Example
The example returns the upper limit for the position value of the joint "joint_1"
of the kinematics "kin_1".

'VBS389
'joint_1
Dim obj
Set obj = ScreenItems("cwc1").GetJointHighLimitExt("kin_1", "joint_1")
HMIRuntime.Trace "Executed " & "GetJointHighLimitExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "kinematic: " & obj.kinematicKey & ", joint: " & obj.jointKey & ",
value: "
HMIRuntime.Trace obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 19
Dynamization
3.2 Methods

3.2.6 GetJointListExt method

Function
Returns the list of all joints of a kinematics in the WinCC 3D Control as the type
"JointsListResult".

Syntax
Expression.GetJointListExt(kinematicKey As String, jointKey As
String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
jointKey Joint name
The function is still in development.
Currently the parameter does not have a function.

Example
The example returns a list of all joints of the kinematics "kin_1".

'VBS390
Dim obj
Set obj = ScreenItems("cwc1").GetJointListExt("kin_1")
HMIRuntime.Trace "Executed " & "GetJointListExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & vbCrLf & "data: " & vbCrLf
For Each attr In obj.data(0)
HMIRuntime.Trace attr & ", "
Next
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
20 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.7 GetJointLowLimitExt method

Function
Returns the lower limit for the position value of a joint of a kinematics in the
WinCC 3D Control as the type "GetJointValueResult".

Syntax
Expression.GetJointLowLimitExt(kinematicKey As String, jointKey As
String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
jointKey Joint name

Example
The example returns the lower limit for the position value of the joint "joint_1"
of the kinematics "kin_1".

'VBS391
'joint_1
Dim obj
Set obj = ScreenItems("cwc1").GetJointLowLimitExt("kin_1", "joint_1")
HMIRuntime.Trace "Executed " & "GetJointLowLimitExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "kinematic: " & obj.kinematicKey & ", joint: " & obj.jointKey & ",
value: "
HMIRuntime.Trace obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 21
Dynamization
3.2 Methods

3.2.8 GetJointValueExt method

Function
Returns the position value of a joint in the WinCC 3D Control as the type
"GetJointValueResult".

Syntax
Expression.GetJointValueExt(kinematicKey As String, jointKey As
String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
jointKey Joint name

Example
The example returns the position value of the joint "joint_1" of the kinematics "kin_1".

'VBS392
Dim obj
Set obj = ScreenItems("cwc1").GetJointValueExt("kin_1", "joint_1")
HMIRuntime.Trace "Executed " & "GetJointValueExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "kinematic: " & obj.kinematicKey & ", joint: " & obj.jointKey & ",
value: "
HMIRuntime.Trace obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
22 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.9 GetKinematicPoseExt method

Function
Returns the pose of a kinematic in WinCC 3D Control as type "GetPoseResult".
The pose of a kinematic is composed of the position values of all joints involved.

Syntax
Expression.GetKinematicPoseExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name

Example
The example returns the position of each joint of the pose of the kinematics "kin_1".

'VBS393
Dim obj
Set obj = ScreenItems("cwc1").GetKinematicPoseExt("kin_1")
HMIRuntime.Trace "Executed " & "GetKinematicsPoseExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " key: " & obj.key & vbCrLf &
" data: "
For Each attr In obj.data
HMIRuntime.Trace attr.key & ": " & attr.value & ", "
Next
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 23
Dynamization
3.2 Methods

3.2.10 GetKinematicsList method

Function
Returns the current and original kinematics in the WinCC 3D Control as the type
"KinematicsResult".
A kinematics contain all included objects of the type "Joint".

Syntax
Expression.GetKinematicsList()

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters
None

Example
The example outputs the properties "zeroPosition", "middlePosition", "static" of the joint
"joint_1" of the current kinematics.

'VBS394
Dim obj
Set obj = ScreenItems("cwc1").GetKinematicsList()
HMIRuntime.Trace "Executed " & "GetKinematicsList" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Example joint_1: " & vbCrLf
HMIRuntime.Trace " zeroPosition = " & obj.current.joints.joint_1.zeroPosition & ",
middlePosition = " & obj.current.joints.joint_1.middlePosition & ", static = " &
obj.current.joints.joint_1.static
HMIRuntime.Trace ", min value = " & obj.current.joints.joint_1.limits.min & ", max value
= " & obj.current.joints.joint_1.limits.max
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
24 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.11 GetObjectBlinkExt method

Function
Returns the flash status of an object in the WinCC 3D Control as the type
"GetObjectBlinkResult".

Syntax
Expression.GetObjectBlinkExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example returns whether the object "object_211" flashes.

'VBS395
Dim obj
Set obj = ScreenItems("cwc1").GetObjectBlinkExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectBlinkExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", blinking: " & obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 25
Dynamization
3.2 Methods

3.2.12 GetObjectFrameExt method

Function
Returns the matrix values for the absolute geometric description of an object in
WinCC 3D Control as the type "GetObjectFrameResult".
The description is absolute.

Syntax
Expression.GetObjectFrameExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the matrix values for the absolute geometric description of the object
"object_211".

'VBS396
Dim obj
Set obj = ScreenItems("cwc1").GetObjectFrameExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectFrameExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " key: " & obj.key
HMIRuntime.Trace vbCrLf & "data: "
' IMPORTANT Trace lines for frame elements must only contain a single one
' elements have vbLongLong type and are too big for the function to handle more info
HMIRuntime.Trace obj.data.frame.elements(0)(0) '!!!
Dim max : max = 15
Dim i
For i = 1 To max Step 1
HMIRuntime.Trace ", "
HMIRuntime.Trace obj.data.frame.elements(0)(i) '!!!
Next
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
26 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.13 GetObjectFrameRelExt method

Function
Returns the matrix values for the geometric description of an object in WinCC 3D Control
as the type "GetObjectFrameResult".
The description is effected relative to the superordinate object.

Syntax
Expression.GetObjectFrameRelExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the matrix values for the relative geometric description of the object
"object_211".

'VBS397
Dim obj
Set obj = ScreenItems("cwc1").GetObjectFrameRelExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectFrameRelExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " key: " & obj.key
HMIRuntime.Trace vbCrLf & "data: "
' IMPORTANT Trace lines for frame elements must only contain a single one
' elements have vbLongLong type and are too big for the function to handle more info
HMIRuntime.Trace obj.data.frame.elements(0)(0) '!!!
Dim max : max = 15
Dim i
For i = 1 To max Step 1
HMIRuntime.Trace ", "
HMIRuntime.Trace obj.data.frame.elements(0)(i) '!!!
Next
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 27
Dynamization
3.2 Methods

3.2.14 GetObjectListExt method

Function
Returns a list of the objects of a scene in the WinCC 3D Control.

Syntax
Expression.GetObjectListExt(showLeafs As Boolean, asScene As
Boolean, asObject As Boolean)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
showLeafs If the parameter is '"TRUE", the list also includes the subordinate objects.
asScene If the parameter is "TRUE", an object of the type "Threejs.Scene" is returned.
The parameter is ignored if the parameter "asObject" is set to "TRUE".
asObject If the parameter is "TRUE", the list is returned as an array of nested objects
with the following definition:
• name: STRING
• uuid: STRING
• children: []
• type: "Group" | "Object"
• position: { x: 0, y: 0, z: 0 }
• rotation: { x: 0, y: 0, z: 0 }
• scale: { x: 0, y: 0, z: 0 }
• visible: BOOLEAN

WinCC 3D Control
28 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.15 GetObjectMaterialColorExt method

Function
Returns the material color of an object in the WinCC 3D Control as the type
"GetObjectMaterialColorResult".

Syntax
Expression.GetObjectMaterialColorExt(key As String, index As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
index Index value of the material color (optional)
If no index value is specified, the first entry is selected.

Example
The example outputs the material color of the object "object_211".

'VBS398
Dim obj
Set obj = ScreenItems("cwc1").GetObjectMaterialColorExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectMaterialColorExt" & vbCrLf & " Returned obj
With type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", color: " & obj.color
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 29
Dynamization
3.2 Methods

3.2.16 GetObjectMaterialCountExt method

Function
Returns the material quantity of an object in the WinCC 3D Control as the type
"GetObjectMaterialCountResult".

Syntax
Expression.GetObjectMaterialCountExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the material quantity of the object "Multi_Material_Cube".

'VBS399
Dim obj
Set obj = ScreenItems("cwc1").GetObjectMaterialCountExt("Multi_Material_Cube")
HMIRuntime.Trace "Executed " & "GetObjectMaterialCountExt" & vbCrLf & " Returned obj
With type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", number of materials: " & obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
30 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.17 GetObjectPositionExt method

Function
Returns the vertex position of an object in WinCC 3D Control as the type
"GetObjectVertexResult".

Syntax
Expression.GetObjectPositionExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the vertex position of the object "object_211"
in the x, y and z directions.

'VBS400
Dim obj
Set obj = ScreenItems("cwc1").GetObjectPositionExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectPositionExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Position: x: " & obj.data.x & ", y: " & obj.data.y & ", z: " &
obj.data.z

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 31
Dynamization
3.2 Methods

3.2.18 GetObjectPropertyExt method

Function
Returns the value of a property of an object in the WinCC 3D Control as the type
"GetObjectPropertyResult".

Syntax
Expression.GetObjectPropertyExt(key As String, property As String,
subProperty As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
property Property name
subProperty Sub-property name (optional)

Example
The example outputs the value of the property "visible" of the object "object_211".

'VBS401
Dim obj
Set obj = ScreenItems("cwc1").GetObjectPropertyExt("object_211", "visible")
HMIRuntime.Trace "Executed " & "GetObjectPropertyExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", data: " & obj.data
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
32 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.19 GetObjectRotationExt method

Function
Returns the vertex rotation of an object in the WinCC 3D Control as the type
"GetObjectVertexResult".

Syntax
Expression.GetObjectRotationExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the vertex rotation of the object "object_211"
in the x, y and z directions.

'VBS402
Dim obj
Set obj = ScreenItems("cwc1").GetObjectRotationExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectRotationExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Rotation: x: " & obj.data.x & ", y: " & obj.data.y & ", z: " &
obj.data.z

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 33
Dynamization
3.2 Methods

3.2.20 GetObjectScaleExt method

Function
Returns the vertex scaling of an object in WinCC 3D Control as the type
"GetObjectVertexResult".

Syntax
Expression.GetObjectScaleExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs the vertex scaling of the object "object_211" in the x, y and z directions.

'VBS403
Dim obj
Set obj = ScreenItems("cwc1").GetObjectScaleExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectScaleExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Scale: x: " & obj.data.x & ", y: " & obj.data.y & ", z: " &
obj.data.z

WinCC 3D Control
34 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.21 GetObjectShadowExt method

Function
Returns the shadow settings of an object in the WinCC 3D Control as the type
"GetObjectShadowResult".
The type contains information about whether an object creates a shadow and whether
other objects can cast a shadow on the object.

Syntax
Expression.GetObjectShadowExt(key As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name

Example
The example outputs shadow values of the object "object_211".

'VBS404
Dim obj
Set obj = ScreenItems("cwc1").GetObjectShadowExt("object_211")
HMIRuntime.Trace "Executed " & "GetObjectShadowExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "Cast: " & obj.data.cast & ", Receive: " & obj.data.receive
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 35
Dynamization
3.2 Methods

3.2.22 SetCameraDataExt method

Function
Sets the camera properties in the WinCC 3D Control and returns the type "GenericResponse".

Syntax
Expression.SetCameraDataExt(fov As Number, near As Number, far As
Number, focus As Number, aspect As Number, zoom As Number, left As
Number, right As Number, top As Number, bottom As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
fov Vertical field of view, from bottom to top in degrees
Default: 50
near Camera frustum close level
Objects that are closer than the value are not rendered.
far Camera frustum remote level
Default: 2000
Must be greater than the value for "near"
Objects that are further away than the value are not rendered.
focus Object distance for stereoscopy and depth of field
Only has influence if a StereoCamera is used.
Default: 10
aspect Aspect ratio of the render area
zoom Zoom factor of the camera
Default: 1
left Camera frustum left (optional)
Objects which are further to the left are not rendered.
Only for the camera type "OrthographicCamera"
right Camera frustum right (optional)
Objects which are further to the right are not rendered.
Only for the camera type "OrthographicCamera"
top Camera frustum top (optional)
Objects which are further up are not rendered.
Only for the camera type "OrthographicCamera"
bottom Camera frustum bottom (optional)
Objects which are further down are not rendered.
Only for the camera type "OrthographicCamera"

WinCC 3D Control
36 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

Note
Explore mode
To determine suitable values for the camera parameters, load the model in Explore mode.
Position the camera in the desired position and read out the values.

Example
The example sets the camera possibilities fov, near, far, focus, aspect and zoom
to the values 90.00, 10.00, 500.00, 10, 1, 1 and returns a confirmation message.

'VBS405
Dim obj
Set obj = ScreenItems("cwc1").SetCameraDataExt(90.00, 10.00, 500.00, 10, 1, 1)
HMIRuntime.Trace "Executed " & "SetCameraDataExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 37
Dynamization
3.2 Methods

3.2.23 SetCameraExt method

Function
Moves and rotates the camera and changes the camera settings in the WinCC 3D Control.
The method returns the type "GenericResponse".

Syntax
Expression.SetCameraExt(x As Number, y As Number, z As Number, rx As
Number, ry As Number, rz As Number, sx As Number, sy As Number, sz
As Number, fov As Number, near As Number, far As Number, flyDuration
As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
x Coordinates for camera position
y The coordinates are optional.
z If you use the coordinates, you must assign all 3 directions.
rx Coordinates for camera rotation
ry The coordinates are optional.
rz If you use the coordinates, you must assign all 3 directions.
sx Coordinates for camera scaling
sy The coordinates are optional.
sz If you use the coordinates, you must assign all 3 directions.
fov Vertical field of view, from bottom to top in degrees
near Camera frustum close level
Objects that are closer than the value are not rendered.
far Camera frustum remote level
Objects that are further away than the value are not rendered.
flyDuration Movement duration in milliseconds (ms)

WinCC 3D Control
38 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.24 SetCameraPositionExt method

Function
In WinCC 3D Control, moves the camera to a specific position and rotates the view to a point.
The method returns the type "GenericResponse".

Syntax
Expression.SetCameraPositionExt(x As Number, y As Number, z As
Number, fx As Number, fy As Number, fz As Number, flyDuration As
Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
x Coordinates for camera position
y
z
fx Coordinates for the viewing direction (center of view)
fy
fz
flyDuration Movement duration in milliseconds (ms)

Example
The example sets the coordinates x, y, z for the camera position immediately to -300, 0, 0
and outputs a confirmation message. The viewing direction is not changed.

'VBS406
Dim obj
Set obj = ScreenItems("cwc1").SetCameraPositionExt(-300, 0, 0, 0, 0, 0, 0)
HMIRuntime.Trace "Executed " & "SetObjectFrameExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 39
Dynamization
3.2 Methods

3.2.25 SetCameraRenderTypeExt method

Function
Sets the render type of the camera in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetCameraRenderTypeExt(key As String , transparent As
Number, opacity As Number, siemensWireColor As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Render type:
• "Mesh"
• "Wireframe"
• "Siemens"
• "SiemensWired"
transparent* Transparency
Set to 1 to apply opacity.
opacity* Opacity
Decimal value between 0.0 and 1.0
siemensWireColor** Line color of the wireframe in the format 'rgb(xxx, xxx, xxx)'

* Only for render type "Siemens" and "SiemensWired"


** Only for render type "SiemensWired"

Example
The example sets the render type 'Wireframe' and outputs a confirmation message.
The other parameters are ignored since they are invalid for the selected render type.

'VBS407
Dim obj
Set obj = ScreenItems("cwc1").SetCameraRenderTypExt("Wireframe", 0, 0, "") ' "Mesh",
"SiemensWired"
HMIRuntime.Trace "Executed " & "SetCameraRenderTypeExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
40 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.26 SetJointValueExt method

Function
Sets the position value of a joint of a kinematics in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetJointValueExt(kinematicKey As String, jointKey As
String, value As Number, interval As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
jointKey Joint name
value Position value
interval Interval in milliseconds (MS) until the motion is performed

Example
The example shows the position of the joint "joint_1" of the kinematics "kin_1" at the interval
of 1500 ms to 20 and outputs a confirmation message.

'VBS408
Dim obj
Set obj = ScreenItems("cwc1").SetJointValueExt("kin_1", "joint_1", 20, 1500)
HMIRuntime.Trace "Executed " & "SetJointValueExt" & vbCrLf & " Returned obj With type "
& VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 41
Dynamization
3.2 Methods

3.2.27 SetKinematicPoseExt method

Function
Sets the pose of a kinematics in the WinCC 3D Control and returns the type
"GenericResponse".
The pose of a kinematics is composed of the position values of all joints involved.

Syntax
Expression.SetKinematicPoseExt(kinematicKey As String, names As
Array, values As Array, interval As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
kinematicKey Kinematics name
names Joints to be modified as an Array of Strings
Dimensions must match the values array
values New position values for joints as an Array of Numbers
Dimension must match the names-Array
interval Interval in milliseconds (MS) until the motion is performed

WinCC 3D Control
42 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

Example
The example sets the pose of the kinematics "kin_1" with the joints "joint_1", "joint_2",
"joint_3" to the values 120, -10, 15 at the interval of 2500 ms and returns
a confirmation message.

'VBS409
Dim arrNames(2)
arrNames(0) = "joint_1"
arrNames(1) = "joint_2"
arrNames(2) = "joint_3"
Dim arrValues(2)
arrValues(0) = 120
arrValues(1) = -10
arrValues(2) = 15
Dim obj
Set obj = ScreenItems("cwc1").SetKinematicPoseExt("kin_1", arrNames, arrValues, 2500)
HMIRuntime.Trace "Executed " & "SetKinematicPoseExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 43
Dynamization
3.2 Methods

3.2.28 SetKinematicsListExt method

Function
Sets the target position of a joint of a kinematics in the WinCC 3D Control and returns
the type "GenericResponse".

Syntax
Expression.SetKinematicsListExt(name As String, desired as Number,
interval As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
name Joint name
desired Target position
interval Interval in milliseconds (MS) until the motion is performed

If no parameters are handed over, the kinematics is reset to the original position.

Example
The example shows the target positions -100, 80, -130 of the joints "joint_1", "joint_2",
"joint_3" of the kinematics at the interval of 1000 ms and outputs a confirmation message.

'VBS410
Dim obj
'joint_1
Set obj = ScreenItems("cwc1").SetKinematicsListExt("joint_1", -100, 1000)
HMIRuntime.Trace "Executed " & "SetKinematicsListExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
'joint_2
Set obj = ScreenItems("cwc1").SetKinematicsListExt("joint_2", 80, 1000)
HMIRuntime.Trace "Executed " & "SetKinematicsListExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
'joint_3
Set obj = ScreenItems("cwc1").SetKinematicsListExt("joint_3", -130, 1000)
HMIRuntime.Trace "Executed " & "SetKinematicsListExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf

WinCC 3D Control
44 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.29 SetObjectBlinkExt method

Function
Activates or deactivates the flashing of an object in the WinCC 3D Control and returns
the type "GenericResponse".

Syntax
Expression.SetObjectBlinkExt(key As String , time As Number , color
As String , siemensColor As String , transparent As Number, opacity
As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
time Time for flash interval in milliseconds (ms)
Set to 0 to stop flashing.
color Color value in format 'rgb(xxx, xxx, xxx)'
siemensColor Color value in format 'rgb(xxx, xxx, xxx)'
Defines the color when flashing in Off state.
Is only used if the render type of the camera is set to "Siemens".
transparent Transparency
Set to 1 to apply opacity.
opacity Opacity
Decimal value between 0.0 and 1.0

Example
The example activates the flashing for the object "object_211" at the interval of 500 ms and
outputs a confirmation message.

'VBS411
Dim obj
Set obj = ScreenItems("cwc1").SetObjectBlinkExt("object_211", 500, "rgb(255, 0, 0)" ,
"rgb(255, 0, 0)", 1, 0.5)
HMIRuntime.Trace "Executed " & "SetObjectBlinkExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 45
Dynamization
3.2 Methods

3.2.30 SetObjectFrameExt method

Function
Changes the matrix values for the absolute geometric description of an object in the
WinCC 3D Control and returns the type "GenericResponse".

Syntax
Expression.SetObjectFrameExt(key As String , frame As Array)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
frame Geometric description of the object as an Array with 16 values of the type "NUMBER"

Example
This example changes the matrix values for the absolute geometric description of the object
"object_211" to 1, 0, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, 0, 96, -2, -1 and outputs
a confirmation message.

'VBS412
Dim frame
frame = Array(1, 0, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, 0, 96, -2, 1)
Dim obj
Set obj = ScreenItems("cwc1").SetObjectFrameExt("object_211", frame)
HMIRuntime.Trace "Executed " & "SetObjectFrameExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " key: " & obj.key & ",
message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
46 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.31 SetObjectFrameRelExt method

Function
Changes the matrix values for the relative geometric description of an object in the
WinCC 3D Control and returns the type "GenericResponse".
The description is effected relative to the superordinate object.

Syntax
Expression.SetObjectFrameRelExt(key As String , frame As Array)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
frame Geometric description of the object as an Array with 16 values of the type "NUMBER"

Example
This example changes the matrix values for the relative geometric description of the object
"object_211" to 1, 0, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, 0, 96, -2, -1 and outputs
a confirmation message.

'VBS413
Dim frame
frame = Array(1, 0, 0, 0, 0, -1, 1, 0, 0, -1, -1, 0, 0, 96, -2, 1)
Dim obj
Set obj = ScreenItems("cwc1").SetObjectFrameRelExt("object_211", frame)
HMIRuntime.Trace "Executed " & "SetObjectFrameRelExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " key: " & obj.key & "
message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 47
Dynamization
3.2 Methods

3.2.32 SetObjectMaterialColorExt method

Function
Sets the material color of an object in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetObjectMaterialColorExt(key As String, activate As
Boolean, color As String, transparent As Number, opacity As Number,
index As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
activate Restore the original color
If the parameter is "TRUE", further parameters are ignored.
color Color value in format 'rgb(xxx, xxx, xxx)'
transparent Transparency
Set to 1 to apply opacity.
opacity Opacity
Decimal value between 0.0 and 1.0
index Index value of the material color (optional)
If no value is specified as the parameter, the first entry is selected.

Example
The example restores the original color of the object "object_211" and outputs
a confirmation message.

'VBS414
Dim obj
Set obj = ScreenItems("cwc1").SetObjectMaterialColorExt("object_211", True, "rgb(0, 200,
100)")
HMIRuntime.Trace "Executed " & "SetObjectMaterialColorExt" & vbCrLf & " Returned obj
With type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
48 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.33 SetObjectPositionExt method

Function
Sets the vertex position of an object in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetObjectScaleExt(key As String , x As Number , y As
Number , z As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
x Vertex position x direction
y Vertex position y direction
z Vertex position z direction

Example
The example sets the vertex position of the object "object_211" to the coordinates (25, 50, 5)
and outputs a confirmation message.

'VBS415
Dim obj
Set obj = ScreenItems("cwc1").SetObjectPositionExt("object_211" , "25" , "50" , "5")
HMIRuntime.Trace "Executed " & "SetObjectPositionExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", " & obj.message

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 49
Dynamization
3.2 Methods

3.2.34 SetObjectPropertyExt method

Function
Sets the value of a property of an object in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetObjectPropertyExt(key As String, property As String,
subProperty As String, newValue As String)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
property Property name
subProperty Sub-property name (optional)
newValue New property value

Example
The example sets the value of the property "visible" of the object "object_211" to "FALSE" and
outputs a confirmation message.

'VBS416
Dim obj
Set obj = ScreenItems("cwc1").SetObjectPropertyExt("object_211" , "visible" , False)
HMIRuntime.Trace "Executed " & "SetObjectPropertyExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
50 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.35 SetObjectRotationExt method

Function
Sets the vertex rotation of an object in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetObjectRotationExt(key As String , x As Number , y As
Number , z As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
x Vertex rotation x direction in radians (rad)
y Vertex rotation y direction in radians (rad)
z Vertex rotation z direction in radians (rad)

Example
The example sets the vertex rotation of the object "object_211" in y direction to -1 and
outputs a confirmation message.

'VBS417
Dim obj
Set obj = ScreenItems("cwc1").SetObjectRotationExt("object_211" , "0" , "-1" , "0")
HMIRuntime.Trace "Executed " & "SetObjectRotationExt" & vbCrLf & " Returned obj With
type " & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 51
Dynamization
3.2 Methods

3.2.36 SetObjectScaleExt method

Function
Sets the vertex scaling of an object in the WinCC 3D Control and returns the type
"GenericResponse".

Syntax
Expression.SetObjectScaleExt(key As String , x As Number , y As
Number , z As Number)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
x Vertex scaling in x direction
y Vertex scaling in y direction
z Vertex scaling in z direction

Example
The example sets the vertex scaling of the object "object_211" in the x, y and z directions
to 2.5 and outputs a confirmation message.

'VBS418
Dim obj
Set obj = ScreenItems("cwc1").SetObjectScaleExt("object_211" , "2.5" , "2.5" , "2.5")
HMIRuntime.Trace "Executed " & "SetObjectScaleExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace " key: " & obj.key & ", message: " & obj.message

WinCC 3D Control
52 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.2 Methods

3.2.37 SetObjectShadowExt method

Function
Sets the shadow settings of an object in the WinCC 3D Control and returns the type
"GenericResponse".
You specify whether an object creates a shadow and whether other objects can cast
a shadow on the object.

Syntax
Expression.SetObjectShadowExt(key As String, cast As Boolean,
receive As Boolean)

Expression
Necessary. An expression that returns an object of the "ScreenItem" type.

Parameters

Parameters Description
key Object name
cast Defines whether an object generates a shadow.
receive Defines whether a shadow is cast on an object.

Example
The example sets the values of the object "object_211" for the created shadow to "TRUE"
and the received shadow to "FALSE". The object itself creates a shadow.
However, other objects do not cast a shadow on the object.
A confirmation message is output.

'VBS419
Dim obj
Set obj = ScreenItems("cwc1").SetObjectShadowExt("object_211", True, False)
HMIRuntime.Trace "Executed " & "SetObjectShadowExt" & vbCrLf & " Returned obj With type
" & VarType(obj) & vbCrLf
Dim attr
HMIRuntime.Trace " Properties of the object: " & vbCrLf & " "
HMIRuntime.Trace "key: " & obj.key & ", message: " & obj.message
HMIRuntime.Trace vbCrLf & vbCrLf

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 53
Dynamization
3.3 Data types

3.3 Data types

3.3.1 Data types (output)

GenericResponse

Property Data type Description


errors ARRAY ARRAY with detailed error messages
message STRING Message
key STRING Object name

Frame

Property Data type Description


frame THREE.Matrix4 Three.js data type (4x4 matrix)

WinCC 3D Control
54 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.3 Data types

GetCameraResult

Property Data type Description


type STRING Render type of the camera
Perspective or orthographic camera
fov NUMBER Vertical field of view, from bottom to top in degrees
near NUMBER Camera frustum close level
Objects that are closer than the value are not rendered.
far NUMBER Camera frustum remote level
Objects that are further away than the value are not rendered.
focus NUMBER Object distance for stereoscopy and depth of field
aspect NUMBER Aspect ratio of the render area
zoom NUMBER Zoom factor of the camera
left NUMBER Camera frustum left (optional)
Objects which are further to the left are not rendered.
Only for the camera type "OrthographicCamera"
right NUMBER Camera frustum right (optional)
Objects which are further to the right are not rendered.
Only for the camera type "OrthographicCamera"
top NUMBER Camera frustum top (optional)
Objects which are further up are not rendered.
Only for the camera type "OrthographicCamera"
bottom NUMBER Camera frustum bottom (optional)
Objects which are further down are not rendered.
Only for the camera type "OrthographicCamera"

GetJointValueResult

Property Data type Description


kinematicKey STRING Kinematics name
jointKey STRING Joint name
data NUMBER Value of the joint
error STRING Error message

GetObjectBlinkResult

Property Data type Description


key STRING Object name
data BOOLEAN Flash status
error STRING Error message

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 55
Dynamization
3.3 Data types

GetObjectFrameResult

Property Data type Description


key STRING Object name
data Frame User defined data type with Frame matrix
error STRING Error message

GetObjectMaterialColorResult

Property Data type Description


key STRING Object name
data MaterialColorParams User defined data type with color parameters
error STRING Error message

GetObjectPropertyResult

Property Data type Description


key STRING Object name
data Depends on the property Object property
error STRING Error message

GetObjectShadowResult

Property Data type Description


key STRING Object name
data ShadowCastAndReceive User defined data types with shadow properties
error STRING Error message

GetObjectVertexResult

Property Data type Description


key STRING Object name
data Vertex User defined data type with coordinates
error STRING Error message

GetPoseResult

Property Data type Description


key STRING Object name
data ARRAY ARRAY from elements of the user defined data type "JointPosition"
error STRING Error message

WinCC 3D Control
56 System Manual, 05/2023, A5E52671436-AA
Dynamization
3.3 Data types

Joint

Property Data type Description


axis THREE.Vector3 Direction of motion
limits limits User defined data type for the limits of the joint
zeroPosition NUMBER Zero position
middlePosition NUMBER Center position
name STRING Name of the joint
static BOOLEAN Movability of the joint
type type-dependent Type of joint
desired NUMBER Target position
interval NUMBER Duration of the motion

JointPosition

Property Data type Description


key STRING Object name
value NUMBER Position value

JointsList

Property Data type Description


name STRING Name of the list
joints Dictionary List of all joints

JointsListResult

Property Data type Description


key STRING Object name
data ARRAY STRINGARRAY
error STRING Error message

KinematicsResult

Property Data type Description


current JointsList User defined data type with list of joints
original JointsList User defined data type with list of joints

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 57
Dynamization
3.3 Data types

Limits

Property Data type Description


min NUMBER Low limit
max NUMBER High limit

MaterialColorParams

Property Data type Description


color STRING Color
transparent NUMBER Transparency
opacity NUMBER Opacity

ObjectMaterialCountResult

Property Data type Description


key STRING Object name
data NUMBER Quantity of materials of an object
Returns "0" if the material is no ARRAY.
Returns "-1" if the material was not found.
error STRING Error message

ShadowCastAndReceive

Property Data type Description


cast BOOLEAN Shadow generation
receive BOOLEAN Shadow reception

Vertex

Property Data type Description


x NUMBER X-coordinate
y NUMBER Y-coordinate
z NUMBER Z-coordinate

WinCC 3D Control
58 System Manual, 05/2023, A5E52671436-AA
Index
SetObjectFrameExt, 46
SetObjectFrameRelExt, 47
A SetObjectMaterialColorExt, 48
SetObjectPropertyExt, 50
AttachObjectExt, 16
SetObjectRotationExt, 51
SetObjectScaleExt, 49, 52
SetObjectShadowExt, 53
D
DetachObjectExt, 17

G
GetCameraExt, 18
GetJointHighLimitExt, 19
GetJointListExt, 20
GetJointLowLimitExt, 21
GetJointValueExt, 22
GetKinematicPoseExt, 23
GetKinematicsList, 24
GetObjectBlinkExt, 25
GetObjectFrameExt, 26
GetObjectFrameRelExt, 27
GetObjectListExt, 28
GetObjectMaterialColorExt, 29
GetObjectMaterialCountExt, 30
GetObjectPositionExt, 31
GetObjectPropertyExt, 32
GetObjectRotationExt, 33
GetObjectScaleExt, 34
GetObjectShadowExt, 35

M
Methods, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 4
4, 45, 46, 47, 48, 49, 50, 51, 52, 53

S
SetCameraDataExt, 36
SetCameraExt, 38
SetCameraPositionExt, 39
SetCameraRenderTypeExt, 40
SetJointValueExt, 41
SetKinematicPoseExt, 42
SetKinematicsListExt, 44
SetObjectBlinkExt, 45

WinCC 3D Control
System Manual, 05/2023, A5E52671436-AA 59

You might also like