CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Sep 16, 2019 3:08 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Apr 23, 2012 1:07 pm 
Offline
User avatar

Joined: Mon Jun 06, 2011 8:42 am
Posts: 47
Hi,

I am trying to get/set project information using scripts.

I can find the "Project information" object using:
Code:
from __future__ import print_function

# define the printing function
def tree(treeobj, depth=0):
    name = treeobj.get_name(False)
    if name == "Project information":
        print(name)
        print(treeobj.get_children().Count)
       
# start looking in primary project
for obj in projects.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


Top
   
PostPosted: Mon Apr 23, 2012 1:15 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Fri Mar 18, 2011 4:12 pm
Posts: 266
Hi, Frank,


Frank Jepsen wrote:

I am trying to get/set project information using scripts.

I can find the "Project information" object using:
Code:
(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.

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Mon Apr 23, 2012 1:22 pm 
Offline
User avatar

Joined: Mon Jun 06, 2011 8:42 am
Posts: 47
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


Top
   
PostPosted: Mon Apr 23, 2012 1:41 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Fri Mar 18, 2011 4:12 pm
Posts: 266
Hi, Frank,

Frank Jepsen wrote:
Ok. Then I will have to make a workaround for now.


Maybe you can utilize the native or PLCOpenXML export/import for that workaround.

HTH,
Markus

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
PostPosted: Mon Apr 23, 2012 2:33 pm 
Offline
User avatar

Joined: Mon Jun 06, 2011 8:42 am
Posts: 47
M.Schaber wrote:
...
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. :lol: (even though this it not a very stable solution)


Top
   
PostPosted: Mon Apr 23, 2012 2:44 pm 
Offline
Frequent User
Frequent User
User avatar

Joined: Fri Mar 18, 2011 4:12 pm
Posts: 266
Hi, Frank,

Frank Jepsen wrote:
M.Schaber wrote:
...
Maybe you can utilize the native or PLCOpenXML export/import for that workaround.
...
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.

_________________
Check out the CODESYS store: http://store.codesys.com/

CODESYS® a trademark of 3S-Smart Software Solutions GmbH
Inspiring Automation Solutions


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited