Extract files with certain equipment group.

Extract files with certain equipment group.

Hello. 
I use Zenon 10 Build 162215, VisualStudio 2022 and Copa-Data Developer Tools 14.
It is a Wizard for Engineering Studio.
I need to export files in the Zenon Editor. I have this code:
  1. i_Anzahl = prj.FileManagement.GetFolder(FolderPath.Graphics).FileCount;
  2. for (i = 0; i < i_Anzahl; i++)
  3.  {
  4.      strZwischenspeicher = prj.FileManagement.GetFolder(FolderPath.Graphics).GetFileItem(i).Name;
  5. String strFilePath3 = Path.Combine(strFilePath1, strZwischenspeicher);
  6. strFilePath2 = Path.Combine(strPath, strZwischenspeicher);
  7. //How can I find out which EquipmentGroup the file is in?
  8. File.Copy(strFilePath3, strFilePath2);
  9. }
I only want to extract files, which belong to a certain equipment group. But I can not find any function to find it out.
With functions this is no problem:
  1. foreach (IFunction myFunction in prj.FunctionCollection)
  2. {
  3.     strZwischenspeicher = myFunction.GetDynamicProperty("SystemModelGroup.SystemModelGroup").ToString();

  4.     if (strZwischenspeicher.Contains(strEquipmentGroupID))
  5.     {
  6.         strFilePath1 = Path.Combine(strPath, myFunction.Name + ".xml");
  7.         prj.FunctionCollection.ExportToXml(myFunction.Name, strFilePath1);
  8.     }
  9. }

    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