I am trying to get/set project information using scripts.
I can find the "Project information" object using:
from__future__importprint_function
\# define the printing functiondeftree(treeobj,depth=0):Â Â name=treeobj.get_name(False)Â Â ifname=="Project information":Â Â Â Â print(name)Â Â Â Â print(treeobj.get_children().Count)Â Â Â Â
\# start looking in primary projectforobjinprojects.primary.get_children():Â Â tree(obj)
I cannot find information on the object in ScriptEngine.chm. Can anyone help me here? Or is the object with project information simply not supported yet?
// Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-04-23
Originally created by: M.Schaber
Hi, Frank,
Frank Jepsen hat geschrieben:
I am trying to get/set project information using scripts.
I can find the "Project information" object using:
(snipped)
I cannot find information on the object in ScriptEngine.chm. Can anyone help me here? Or is the object with project information simply not supported yet?
Currently, this object is not supported yet.
I propose that you file this as a feature request via our support department.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
M.Schaber hat geschrieben:
...
Maybe you can utilize the native or PLCOpenXML export/import for that workaround.
...
I have now tried that and cannot get it to work unfortunately.
I tried creating a project with some content and project information, exported it and imported it again. The project information goes into the XML I can see, but I cannot load the project information again; only the other content is loaded. Is this a known issue?
The workaround I hoped for was exporting to PLCOpenXML, edit XML using scripts, and import it again.
Now it seems that I have to resort to my previous "workaround", where I have used an auto-mouse/keyboard-clicker to automatically click around in the GUI. (even though this it not a very stable solution)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2012-04-23
Originally created by: M.Schaber
Hi, Frank,
Frank Jepsen hat geschrieben:
I tried creating a project with some content and project information, exported it and imported it again. The project information goes into the XML I can see, but I cannot load the project information again; only the other content is loaded. Is this a known issue?
I'm not that deep into the export/import function details so I'm afraid I cannot answer that question. If the same problem appears when importing manually via the menu, maybe the general forum can help you. Or you can always fall back to our support department.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to get/set project information using scripts.
I can find the "Project information" object using:
I cannot find information on the object in ScriptEngine.chm. Can anyone help me here? Or is the object with project information simply not supported yet?
// Frank
Originally created by: M.Schaber
Hi, Frank,
I cannot find information on the object in ScriptEngine.chm. Can anyone help me here? Or is the object with project information simply not supported yet?
Currently, this object is not supported yet.
I propose that you file this as a feature request via our support department.
Hi M.Schaber,
Ok. Then I will have to make a workaround for now.
I will try to create a feature request for it.
Regards,
Frank
Originally created by: M.Schaber
Hi, Frank,
Maybe you can utilize the native or PLCOpenXML export/import for that workaround.
HTH,
Markus
I have now tried that and cannot get it to work unfortunately.
I tried creating a project with some content and project information, exported it and imported it again. The project information goes into the XML I can see, but I cannot load the project information again; only the other content is loaded. Is this a known issue?
The workaround I hoped for was exporting to PLCOpenXML, edit XML using scripts, and import it again.
Now it seems that I have to resort to my previous "workaround", where I have used an auto-mouse/keyboard-clicker to automatically click around in the GUI. (even though this it not a very stable solution)
Originally created by: M.Schaber
Hi, Frank,
I'm not that deep into the export/import function details so I'm afraid I cannot answer that question. If the same problem appears when importing manually via the menu, maybe the general forum can help you. Or you can always fall back to our support department.