Sample project to open a .pdf file / .jpg file
this sample project backup (created with zenon 6.22 SP0) shows how to open a .pdf file (in the acrobat reader) or a .jpg file in the HTML window, depending on the value of a variable. Opening the acrobat reader (function "start program") or showing the
Variablen im Editor aus der Runtime löschen
Folgende Fragestellung: ich möchte mithilfe eines VBA-Makros in der Runtime, Variablen aus dem Editor, sprich Offline, löschen. zusätzlich möchte ich, dass die Wertebereiche bestimmter Variablen, auch in der Editorversion der Variable eingetragen werden.
CommonDialog
I'm trying to use a commondialog control in a form but it return to me that is not licensed. I'm using the same control in a form under workspace without problem. There is any way to register this control, by code, in the project as is done in the workspace,
Daten in einem VBA-Formular an eine Variable übergeben
Hallo, hoffentlich ein leichtes, aber da ich sehr wenig Erfahrung mit VBA habe, ein schwieriges Problem für mich: Bereits geschafft: Lasse mir eine Interne Varibale (Name: Uhr_Abluft) in ZenOn anzeigen und habe diese Anzeige mit einem VBA -> LeftClickDown
Delete structured tag
me again :rolleyes: VBA Code: VarTypeIndex = 0 For Index = zPRJ.VarTypes.Count - 1 To 0 Step -1 Name = zPRJ.VarTypes.Item(Index).Name If Right(Name, 13) = ".InternalData" Or _ Right(Name, 9) = ".MathData" Or _ Right(Name, 9) = ".NodeData" Or _ Right(Name,
Update pictures with VBA
Using this code I modify/delete some pictures in my project. About modified pictures, when I open it for the first time look good, but starting from the second time the pictures is exactly how was before the change in VBA. I don't understand why. There
Delete item in a combobox
Hi During project configuration VBA "fill" a combobox in this way. Set zPIC = zPRJ.DynPictures.Item("Layout.Top") zPIC.Elements.Item(2).CreateDynProperty ("States[" & CStr(IndexObj) & "]") zPIC.Elements.Item(2).CreateDynProperty ("States[" & CStr(IndexObj)
Creating mathematic variables including formulars (Counter)
This sample shows how to create an statistic counter (mathematic) on a variable: VBA Code: Public Sub CreateMatheVariable() Dim obDriver As Driver Dim obVarType As VarType Dim nChannelType As Integer Dim obVar As Variable 'create an Object of the Mathematic
Teile eines Strings mittels VBA darstellen (BACnet)
Hallo, ich kann mir das Weekly Schedule BACnet Objekt (String) anzeigen lassen. Zu erkennen sind die einzelnen Wochentage Montag bis Sonntag einschließlich Ein- und Auszeiten. Bsp.: {{{04:00:00:00, [2] 1}{17:00:00:00, [2] 2}}{{04:00:00:00, [2] 1}{17:00:00:00,
WriteCELStringEx
Hello, I created a variable USER_ID as an internal variable of data type String. I need to create a CEL entry using this variable so that I have something like below: I did this: VBA Code: Dim vValue as Variant vValue = CVar("A001") thisProject.Cel.WriteCelStringEx
Zugriff auf Formelvariablen in Combielement
Hallo an alle! Ich suche eine Möglichkeit per VBA alle in einem Bild benutzten Variablen auszulesen. Wir nutzen zu 90% das Combielement und die Variablen werden darin als Formelvariablen hinterlegt um die Animationen zu definieren. Ich finde keine Möglichkeit
Alarm object in vba of integration projectnot is not working for sub-projects
Hey everybody, I do have a problem with the Alarm object in vba of an integration project. Using following code: VBA Code: Option Explicit Dim WithEvents zAlarm As Alarm 'procedure is executed on startup of the zenOn runtime Private Sub Project_Active()
Start Function From PCE
Is it possible to start a function from PCE VBscript? I'm running with window CE 5.0. Thank! This is a migrated post! Originally posted on 16.05.2008 by user stephanepilon. Please be aware that information can be outdated.
Event in 'žDachprojekt'œ on alarm occurrence in an underlying project
Hello everybody! Is there a way to get a VBA event in the “Dachprojekt†in case of alarm occurrence in one of the projects under the “Dachprojekt†. Sample out of the help: VBA Code: Dim WithEvents zAlarm As Alarm 'procedure is executed on startup
ArchiveValues.DeleteArchiveValue
Is possible to have a little example how to use this method? thank you very much This is a migrated post! Originally posted on 08.04.2008 by user fabios. Please be aware that information can be outdated.
modify Scheduler with VBA
Sorry Mark one more question please! Let me describe the steps that i have done. 1- I created the variable that i will use in the scheduler(Editor). 2- Then i created the switching point in the scheduler (Runtime). 3- Now what i want to do is to change
Start a VBA Macro with PCE
How can I start a VBA Macro with PCE. I have a thread with a If-Function. If this If-Function is true in the thread, a VBA Macro should start. VBA Code: Dim a a=1 If a = 1 Then Macro should start End If Can anyone help me with this problem?? Please. Yours,
Multithreading with PCE and VBScript
Hi Folks! I have a tremendous problem! The Problem: I have programmed a simulation. In the simulation there is a long loop. When this loop is working i can't do anithing. So i thought i should program it with multithreading. And now to my problem. I have
Start a thread in VBA
Hi Folks! How can I start a thread with VBA. The problem is, when I write this code: VBA Code: thisProject.Tasks.Item(taskname).Run it doens't start. When i debug this request, there is also a mistake: Objectvariable or With-Blockvariable not declared
The event OnElementCreated is not executed
I want to automatically modify a dynamic element through VBA or an external C# application after it has been created by the user, by reacting on the event "OnElementCreated". However whenever I create a dynamic element, only the event "OnObjectCreated"
Change variable status
Please, how to change variable status to alternate value, seting alternate value and seting back tu spontanous value ??? Thanks Miro. This is a migrated post! Originally posted on 04.01.2008 by user brada. Please be aware that information can be out
Login
Dear User! I have a problem! My problem is, that I don't know, how I can make a login in an own made GUI. If I open the ZenOn Runtime, you can 1) Login if you would do things where only an admin is allowed to to. 2) for the whole personal. If the login
Accessing the rgm recipe name combobox
Hi, i need to access the rgm recipe name in the standard RGM page but i'm not able to do it. this is my actual code: VBA Code: Public Sub test() Dim i, nProps, obj Dim tmp_str As String Set obj = thisProject.DynPictures.Item("RGM").Elements.Item("Recipe_name")
VBA wizards freeze on some computers
On some computer hardware, it can happen that the initial execution of a VBA wizard freezes for some time. After this period of time the execution will continue. It is known that a process "SingleSignOn" on some laptops can cause VBA wizards to freeze
Positioning of VBA forms (over element, top left, bottom right, .....)
How is it possible to positioning the form exactly over the element? The "problem" in this case is that VBA does not use pixel units. It uses the so-called "twips". The procedure is as followed: 1. get the actual position of the the cursor 2. calculate
VBA and Microsoft Access
I need to transfer data from a Access table to certain tags in Zenon. How can I do this in VBA? This is a migrated post! Originally posted on 23.11.2007 by user bjoerndavid. Please be aware that information can be outdated.
Referencing variable on a picture
I have a link text element called SerialNo on a Picture called ChordWeld. It is linked to a variable also called SerialNo. How do I access that particular variable to change its value using a macro? This is a migrated post! Originally posted on 15.11.2007
Message-Box "VBA Error 1" appears at RT start
When I start zenOn Runtime (client, server, or WEB client,…), I always get an errormessage called "VBA Error 1". What does it mean? "VBA Error 1" means, that the VBA file used by the zenOn Rutime is currently set to "read only", or exclusively opened
"Non modal" Userforms on zenOn WEB-Client
I created a VBA macro within my project, in which I use different "non modal" userforms. They work very fine on my Server, but not on my zenOn WEB client! If I open my non-modal userform on my WEB client, my zenOn runtime is not reacting to any mouseclicks
VBA on webclient
Why isn't my VBA code working on the webclient? per default the webclient setup does not contain the VBA part. You can install the VBA part manually on each machine where the webclient should be run, by executing the setup from the webserver CD. This
non-linear value adjustment
Which macro ist executed during the reading- and during the writing process with the non-linear value adjustment AdjustHardwareValue: calculates the value from zenOn to the PLC and writes the value on the PLC AdjustZenOnValue: calculates the value during
Restore deleted links in elements
How can I restore links which already existed but get lost because of the element-id changed COPY the following code into myWorkspace and execute VBA Code: Private Sub SubstitudeItems() Dim obVar As Variable Dim obElem As Element Dim obPic As DynPicture
How to login in a multi project surrounding via VBA?
Using login functions in multi project surroundings restricts the full functionality of the user administration. We recommend not to change the passwords during the runtime (if you would like to do this please contact our support (). In addition you can
ActiveX Control in zenOn
How to integrate an activeX control in zenOn and update values in the activeX control Step 1: Be aware that your activeX control is already registered (regsvr32 ) Step 2: insert the activeX control into the zenOn picture (Insert dynamic element -> activeX
Multiscreen with VBA - show VBA form on the dedicated monitor
I have a multimonitor system (3 monitors) and have created some VBA forms. When I want to call i.e. the VBA form at the thrid monitor the form always appears on the first monitor :confused: At the multimonitor configuration the monitor are sperated i.e.
When I try to open the VBA editor in the zenOn editor, nothing happens
When I try to open the VBA editor in the zenOn editor, nothing happens Perhaps VBA is disabled (zenon6.ini [VBA] EIN=1) or the project is a CE project (project properties, general, "CE Project", or important references are not set correctly (FM20.dll)
When I start the zenOn editor a windows installer messag appears
I installed zenOn on my PC and when the editor or the runtime is started, a windows installer message appears! Why is this and what can I do about it? zenOn installs with the editor and the runtime also the merged module VBA from microsoft. As also other
Imported wizard does not show up in wizard list
I have imported a VBA wizard in the zenOn editor, and it states success in the output window, however it does not show up in the VBA wizard list (Alt+F12). What am I doing wrong? Probably the wizard uses a file or an activeX control which is either not
VBA Object Overview
The grphical object model is stored as an PDF file... This is a migrated post! Originally posted on 16.08.2007 by user robertf. Please be aware that information can be outdated.
Create a function for a trend picture
Here is a basic sample how to create a function for an extended trend picture... 'Create Function for TREND - PICTURE Sub CreateTrendFunction() Dim zPIC As DynPicture Dim zFCT As RtFunction Dim i As Integer Set zPIC = MyWorkspace.ActiveDocument.DynPictures.Item("TREND")
Next Page