VBA Wizard for replacing invalid characters in RGM (GroupName resp. Recipename)

VBA Wizard for replacing invalid characters in RGM (GroupName resp. Recipename)

In older versions of zenon (~ zenon 6.22 and older) it was possible to have special characters within the RGM (Recipe Group Manager) within the Recipegroupname and Recipename.
When converting this project into newer versions of zenon (i.e. zenon 7) a messagebox will be displayed when i.e. a new RGM-function is created resp. an exisiting one should be edited.
Invalid characters within Recipegroupname and Recipename are:
\ " ' . / * ? < > | :
With zenon 7.10 an automatic renaming of this invalid charactes is done (for Recipegroupname and Recipename) - the RGM-functions need to be corrected by hand.
In the attachment a VBA Wizard can be found which replaces those invalid characters with the character "_" (Default - can be adapted in the VBA code).
It will replace the invalid characters in
- Recipegroupname
- Recipename
- RGM-functions which are refering to Recipegroupname resp. Recipename
Furthermore it is recommended to change the RGM storage from "MS Access DB" to "Binary files" because the "MS Access DB" can not be supported for zenon versions >= 7.10 (see revision text for further information)
Below a detailed instruction:
- create project backup
- the project which should be adapted must be the "active" project
- open VBA Editor (in zenon Editor press ALT+F11)
- rightclick at "ZWorkspace" and choose "Import files" from the context menue
- choose the attached VBA Module "basReplaceSpecialCharactersRGM.bas"
- open "basReplaceSpecialCharactersRGM.bas" in the tree ("ZWorkspace" -> Module) with a doubleclick
- put the mouse cursor below "Public Sub replaceSpecialCharactersRGM()" and press "F5"
- the Wizard needs some time depending on the amount of RGM configured (do not interrupt!)
-> a messagebox is disiplayed when the Wizard has finished
- in the zenon Editor *.xml epxort all RGM Recipegroups
- at the project settings at "Recipegroupmanager" at "RGM datastorage" change it from "MS Access DB" to "Binary Files"
- in the zenon Editor import the *.xml exported RGM Recipegroups again
regards,
herbert

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