Variablenzahl im dyn Grenzwerttext

Variablenzahl im dyn Grenzwerttext

Hallo
Wenn man die Anzahl der Variablen, die man im dynamischen Grenzwerttext ("$%v1;v2..") einer Variablen benutzt, verändert, scheint sich auch auf alle älteren Datensätze dieser Variablen auszuwirken.
Bsp.:
v ist eine boolsche Variable, die beim Wert "true" einen dynamischen Grenzwerttext besitzt.
t1, t2 sind String-Variablen, die in diesem Grenzwerttext benutzt werden.
VBA Code:
thisProject.Variables.Item("t1").Value = "text1 "
thisProject.Variables.Item("t2").Value = "text2 "
' zum Testen: dreimal v setzen und wegnehmen, vorher wird immer der dynamischen Grenzwerttext neu gesetzt
thisProject.Variables.Item("v").Limits.Item(1).Text = "$%t1"
thisProject.Variables.Item("v").Value = 1
thisProject.Variables.Item("v").Value = 0
thisProject.Variables.Item("v").Limits.Item(1).Text = "$%t2"
thisProject.Variables.Item("v").Value = 1
thisProject.Variables.Item("v").Value = 0
thisProject.Variables.Item("v").Limits.Item(1).Text = "$%t1;%t2"
thisProject.Variables.Item("v").Value = 1
thisProject.Variables.Item("v").Value = 0


Es wurden also 3 Einträge in der AML erzeugt und das Ergebnis sollte sein:
text1
text2
text1 text2

Stattdessen habe ich:
text1 >>>
text2 >>>
text1 text2

Wenn man nun nochmals den dynamischen Grenzwerttext ändert, verändert sich auch der Text der Einträge und zwar nicht nur für die zukünftigen, sondern auch für alle bereits gespeicherten! :
thisProject.Variables.Item("v").Limits.Item(1).Text = "$%t1" 'nur noch eine Variable
Ergebnis:
text1
text2
text1

noch schlimmer wirds, wenn man keine Variable mehr benutzt, sondern Festtext:
thisProject.Variables.Item("v").Limits.Item(1).Text = "abc"
Ergebnis (für alle Einträge, auch die alten mit den Variablen)
abc
abc
abc

Es wird also nicht mit gespeichert, ob und wieviele Variablen benutzt wurden. Bug oder Absicht?

Grüße
Robert

This is a migrated post! Originally posted on 02.10.2008 by user elric. Please be aware that information can be outdated.

    Disclaimer

    This document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.

    The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.

    Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.

    Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.

    COPA-DATA reserves the right to change this document from time to time at own discretion.


    Ing. Punzenberger COPA-DATA GmbH
    Karolingerstraße 7b · 5020 Salzburg · Austria
    www.copadata.com