Gedoppelter Code beim Exportieren der Klassen

Gedoppelter Code beim Exportieren der Klassen

Hallo zusammen,
wir haben einen Wizard, mit dem wir alle Module unseres aktiven Projekt exportieren.
Das Exportieren wird mithilfe von VBComponent.Export ausgeführt und funktioniert bei den normalen Modulen ( .bas-Dateien) einwandfrei, nur gibt es Probleme bei einigen Klassenmodulen und bei thisProject (.cls-Dateien) wenn in denen folgende Kombination stattfindet:
VBA Code:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END

In diesem Fall wird dieses Teil des Codes zwei Mal kopiert. Also, nach dem Exportieren des Codes bekommen wir folgendes:
VBA Code:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "thisProject"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
End
Option Explicit

Anstatt folgendes:
VBA Code:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "thisProject"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Option Explicit

In diesem Wizard wird der Code der Modulen des aktuellen Projekts mit dem Code der Modulen in einem Referenzordner verglichen. Da der exportierte Code falsch ist, funktioniert die Vergleichung bei diesen Klassemodulen nicht. Gibt es eine Möglichkeit dieses Problem zu lösen ohne das Vergleichen-Mechanismus ändern zu müssen?
Auch haben wir gemerkt, dass das Löschen von Projekt-Modulen durch VBA geht nicht. Also, wenn man folgendes schreibt:
VBA Code:
VBProj.VBComponents.Remove VBComp

Taucht eine System-Fehlermeldung die sagt, dass ein falscher Parameter gibt.
Ist es möglich in zenon durch VBA Modulen vom aktuellen Projekt zu löschen?
Danke im Voraus und Gruß
rln

This is a migrated post! Originally posted on 30.04.2013 by user rln. 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