Export Graphics depending on SytemModelGroup
Hi.
Every item in Zenon can be connected to a SystemModelGroup.
I already have code to export screens, functions and more which are connected to the SystemModelGroup "Customized".
But it seems, that I can not do that for graphics and symbols.
Here is example-code out of my application. Besides of the lines commented out it is working fine.
There is no GetDynamicProperty for Graphics.
Is there a possibility to get the SystemModelGroup of a graphic file?
- #region Graphics
- //11_Graphics anlegen
- strPath = Path.Combine(strExportPfad, "11_Graphics");
- if (Directory.Exists(strPath))
- {
- }
- else
- {
- Directory.CreateDirectory(strPath);
- }
- ////Graphics exportieren.
- for(int i=0; i < prj.FileManagement.GetFolder(FolderPath.Graphics).FileCount;i++)
- {
- String strZwischenspeicher;
- //strZwischenspeicher = prj.FileManagement.GetFolder(FolderPath.Graphics).GetFileItem(i).GetDynamicProperty("SystemModelGroup.SystemModelGroup").ToString();
- //if (strZwischenspeicher.Equals("Customized"))
- //{
- strFilePath1 = Path.Combine(prj.Path, "zenon");
- strFilePath1 = Path.Combine(strFilePath1, "custom");
- strFilePath1 = Path.Combine(strFilePath1, prj.FileManagement.GetFolder(FolderPath.Graphics).Name);
- strFilePath1 = Path.Combine(strFilePath1, prj.FileManagement.GetFolder(FolderPath.Graphics).GetFileItem(i).Name);
- strFilePath2 = Path.Combine(strPath, prj.FileManagement.GetFolder(FolderPath.Graphics).GetFileItem(i).Name);
- File.Copy(strFilePath1, strFilePath2);
- //}
- }
- #endregion