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.