Different Eventhandlers for 1 OnlineContainer
Hi everyone, i have started handling with OnlineContainers and the eventhandler. i want to observe 20 variables.. i just see 2 options to observe / manage the events: 1. Create an OnlineContainer for every Variable to have an own Eventhandler C# Code:
PFS: Fehler beim Anlegen einer Pause
Hallo! Ich versuche gerade per C# den PFS zu parametrieren. Beim Anlegen einer Pause wird das Script bei ".CreateBreak" einfach ohne Fehlermeldung abgebrochen. Auszug aus dem Code: C# Code: ... try { lsPausenname[0] = "Morgen"; zoModellBreak = zoModellShift.Breaks().CreateBreak(lsPausenname);
Change a variable at the function in the editor
Hi, i guess i have almost the same question, therefore i wrote into this thread. i want to change the linked variable of a function (value change function) with VSTA. i export the xml code to get the correct property name. (bold marked) - setInitValues
change linked variable of an element during runtime
Hi, How can I change the linked variable of an element during run time using VB.net macro. I have something like this Private Sub zDynamicPicts_Open(ByVal obDynPicture As zenOn.IDynPicture) Handles zDynamicPicts.Open ' MsgBox(CStr(obDynPicture.Name))
Kopieren großer Dateien
Hallo Zusammen, in einem VSTA-Macro, das ich über einen Grenzwert aufrufe kopiere ich mit dem Befehl File.Copy(FilepathSource, FilePathDestination, true); eine Datei. Nun habe ich das Problem, dass ich Zenon nicht mehr bedienen kann solange kopiert wird.(Es
Einträge in Kontextmenü neu sortieren
Hallo, ich suche eine Möglichkeit Einträge in einem Kontextmenü per VSTA neu zu sortieren. Das Menü wird per Skript im Editor angelegt und erweitert wenn per Wizard neue Anlagen in das Projekt importiert werden. Für jede Anlage wird ein Eintrag im Kontextmenü
How can i duplicate VSTA ProjectAddin
Hello, i've 25 ZenOn projects in the editor. i've a VSTA ProjectAddin in one of this project with many .cs files. i want to duplicate the VSTA in all the projects. is it possible to duplicate quickly the VSTA project? (by copying files? import/export?
Remote Debug
Hallo Zusammen, wie kann man mit VSTA ein Remote Debug machen.? This is a migrated post! Originally posted on 10.10.2013 by user armins. Please be aware that information can be outdated.
AML&CEL Resource Label Filtering
Hello Gents, I had to give each of Alarm message and Event message a specific alarm number. I did this with using Resource Label of each variable. Right now, i have to filter them in Runtime according to Alarm number/ Resource Label in AML and CEL screens.
How i can recognize system display by MonitorId
We use multi-monitor project, i my VSTA code i try use MouseOver to detect on which is display Element object is located. And display there are Windows form. I try use property DynPicture.MonitorId and always received 0x100 or 0x101. I guess last two
Farben dynamisch zuweisen
Hallo, ich versuche gerade einem Rechteck eine dynamische Variable zuzuweisen, die Variable ist intern und als DWORD deklariert. Aber in der Runtime kommt immer die statisch vorgewählte Farbe. Was kann ich tun? Ich nutze zenon Supervisor 7.10 Demoversion,
How to create dynamical elements in VSTA
Hi, I am using a demo version of Zenon 7.1 Supervisor. In an application we need a dynamic number (depending on varying setups) of controls such as buttons, static text elements and textboxes. I tried running some code like this, adapting to samples in
Screen Name identification in Double Monitors
Hello Gents, First Question: I have a double monitor project, i am opening same screens and frames in the startup so two monitors are clones and after project start it gives me flexibility of having different screens. I am getting the picture name from
AK Driver Properties
Hello Gents, Because of a long story i would like to check AK Variables "Marker" property in VSTA for all my variables. For testing of one variable i used; C# Code: this.Variables().Item("Variable1").get_DynProperties("MERKER")ToString(); but it is not
cdwpf code examples, where to get?
Hello, colleagues! Can you give to people some examples of cdwpf (with source code of course)? For example bargraph with code corrected percent scale, or something like this. This is a migrated post! Originally posted on 20.08.2013 by user stolyarov_as.
Ip-Change(S7TCP32) with VSTA
Hello All, is it possible to change the ip-address from a S7TCP32-driver via VSTA-Editor? I guess i just donÂ't get the right property. i tried something like: myZenWorkspace.ActiveDocument.Drivers().Item("S7TCP32").get_DynProperties("IP").ToSting();
Windows Form Start Position
Hello Gents, I am using Windows Forms in Sicam230. I would like to open these forms relative to mouse. Any ideas?:confused: This is a migrated post! Originally posted on 07.08.2013 by user yavaskoray. Please be aware that information can be outdated.
Detect Language Change
Hello All, I want to understand the "Language in Runtime" with C#. According the language changes in the Runtime i have to change texts in a C# windows form. Is that possible without dummy internal variables etc.? :confused: This is a migrated post! Originally
Object Model In VS2012
Hi, I would like to use the object model in a VS2012 VB.Net project. Is there a sample anywhere? This is a migrated post! Originally posted on 29.07.2013 by user allmendinger. Please be aware that information can be outdated.
WPF-Element: Auslesen des Inhalts eines WPF-Propertys auf zenon-Variable
Hallo! Ich entwerfe gerade ein WPF Steuerelement um eine Listbox mit Multiselect für zenon zu erhalten. Die Listbox wird über den Inhalt einer zenon Variabel gefüllt, das funktioniert soweit schon. Jetzt brauche ich noch die Information welche Einträge
WPF with .Net
Can zenOn handle WPF controls that have .Net code attached with them? All the example controls on the COPA-DATA website are XAML only. The WPF examples I've found on the internet compile into an executable. Can zenOn use these? Thanks, Denis This is a
Fehler bei COM-Zugriff aus Windows Service
Hallo Forum Ich möchte aus einem Windows Service (C#) auf die laufende Zenon-Runtime zugreifen und bekomme in der Zeile zenOn.Application zen = (zenOn.Application) System.Runtime.InteropServices.Marshal.GetActiveObject("zenOn.Application"); immer diesen
Script in Vsta aufrufen
Hallo Zusammen, ich möchte ein ZenonScript mit der Funktion this.RtFunctions().Item("Scriptname").Start() aufrufen. Klappt aber nicht. Bekomme die Meldung Object reference not set to an instance of an object Der Aufruf einer ZenonFunktion klappt aber.
Problems with set_DynProperties
Hi, I'm having problems with the set_DynProperties function in VTSA. I'm trying to write to the "text line 1" property of the button. zenOn.IDynPicture scr = this.thisProject.DynPictures().Item("Screen1"); zenOn.IElement btn = scr.Elements().Item("Button1");
$_Parameters of Symbols
Hello everybody, I'm trying to manipulate the $_parameters of a Symbol from project bibliothek. it works like this ...set_DynProperties(@"$_Hintergrund\BackColor", "8000001B"); By executing the Makro I get an error, that there is an invalid Value : $_Hintergrund\BackColor
Background Color of Button doesn't change
Hi, i want to change the Background color of buttons in the RT in a function, when clicking on it i do in a macro public void Macro_ColorChange { this.DynPictures().Item("Picture1").Elements().Item("Button1").BackColor = 0xA0ACB3; this.DynPictures().Item("Picture1").Elements().Item("Button2").BackColor
mouse event
Hello Everybody, have Problems with following code. The Event does not raise, when i click on a button. i have it also testet with other Events like dblClick and so on.. but nothing happens. thanks for help. zenOn.DynPictures zScreens = new zenOn.DynPictures();
Change of Background Color of Button at RT screen
Hi Everybody, i want to change the Background Color of a button on a RT-screen in a VSTA Macro. like this this.DynPictures("MyPicture).Item("MyButton").BackColor("green"); i know this doesnt work. Is this possible ? This is a migrated post! Originally
Recogize if Hardware has changed, WndProc
Hi, i have to recognize if hardware changes (Usb-Stick is plugged in). i found an idea in the internet, which works on a normal C# Programm const int WM_DEVICECHANGE = 0x0219; //see msdn site protected override void WndProc(ref Message m) { if (m.Msg
read variable from runtime
Hi, i am a beginner with zenon and have Problems with reading a variable from the runtime. public void Macro1 { int x=0; zenOn.IVariable yVar = this.Variables().Item("testvar1_2"); x = (int)yVar.get_Value(0); <------does not work , x is always 0 .....
Events werden beim Debuggen in der Runtime nicht ausgelöst
Hallo! Ich habe eine Problem beim Debuggen in der Runtime. Auszug aus VSTA zum Projekt: C# Code: void ThisProject_Active() { //Create any required API-References here (Event handlers, OnlineContainers, local references,etc. ) // << TODO: Add Initialization
Anwendung von SetZoomAndPos(float ZoomX,...
Hallo! Ich soll für einen Kunden in einem Weltbild die Möglichkeit schaffen mit der Maus zu zoomen. Es soll mit der Maus ein Bereich im Bild markiert werden, der dann gezoomt dargestellt wird (linke Maustaste drücken und halten > Bereich durch aufziehen
Basic WPF help
hi, i am new user for zenon. i have zenon 7.0 and i add some Wpf elements on my project. i try sometings but not work. i am downloaded wpf from copa data main page. Can anyone help me about their use? This is a migrated post! Originally posted on 08.05.2013
Replace Signature function for Screen Type Specific Function
Hello colleagues! Suppose we have one of such two scenaries: 1) On control dialog user press some button with screen type specific function of ActionX and then some VBA or VSTA code should do some checks and then call or not call Execute 2 function (instead
How to: get the state of a network adapter
hi, as this question appears from time to time, I created a small sample how to get the network information from the available network interfaces into zenon. I used the NetworkChange class from the .NET Framework (in namespace System.Net.NetworkInformation)
Bearbeiten von Alarmbereichen im Editor per VSTA
Hallo! Ich arbeite gerade an einem C# Wizard mit der Variablen und dazugehörende Projektbereiche automatisch generiert werden. Jetzt vermisse ich eine Möglichkeit per Scripting Alarmbereiche, Alarmklassen und Alarmgruppen im Projekt zu berabeiten (anlegen,
Feststellen des Symbols des Elements das "ElementLeftButtonUp" ausgelöste hat
Hallo! Ich habe ein Projekt wie in http://www.copadata.com/forums/showpost.php?p=6615&postcount=2 beschrieben erweitert um das Objekt herauszubekommen auf das geklickt wurde, da ich in einem anderen VSTA-Macro wissen muss woher der Aufruf kam. Nun habe
Funktioniert ein Online Variablen Container auch Projektübergreifend?
Hallo! Ich bin gerade an der Umsetzung eines großen Leittechnikprojektes und versuche die Funktionalitäten in Projekten zu verteilen. Es soll ein zenOn Projekt in dem Verbund geben, in das möglichst alle VSTA - Funktionalitäten für das gesamte Leittechnikprojekt
change font size of ActiveX ListBox
Hi there! I use a ActiveX-Element "Microsoft Forms 2.0 ListBox-Control" on my screen and add some entries to it. But unfortunately the fontsize is much too small. How can I set the font size of the control? It doesn't matter if at runtime or design mode.
VstaIDE Error: Unable to create macro project...
Hallo! Ich habe ein Problem beim –ffnen der VSTA-Umgebung für ein ProjectAddin. Wenn ich in einem Projekt unter Programmierschnittstellen -> VSTA -> VSTA-Editor mit ProjectAddin öffnen... auswähle bekomme ich folgende Fehlermeldung: [INDENT] VstaIDE Error:
Next Page