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 Feb 24, 2020 9:30 pm

All times are UTC+01:00

Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 04, 2019 2:40 pm 

Joined: Tue Apr 02, 2019 7:59 pm
Posts: 2
I've been trying to find out how to utilize the features defined on;product=ScriptEngine;version= in the help documentation and I haven't had very much luck. I specifically would like to use the ScriptExternalFileObject functions to help with a project I'm working on for my company. If anyone has some tips/tricks/additional documentation I can look at, it would be appreciated.


PostPosted: Fri Apr 05, 2019 9:21 am 
Frequent User
Frequent User

Joined: Tue Nov 13, 2012 9:20 am
Posts: 262

Here is some example code:
proj = projects.primary

proj.create_external_file_object(r'd:\tmp\README.txt', 'someText', ReferenceMode.Embed, AutoUpdateMode.Always)

found = proj.find('Application', True)
if found is not None and len(found) == 1:
    raise Exception("No or more than one object found")
app = found[0]

app.create_external_file_object(r'd:\tmp\README.txt', 'someTextBelowApp', ReferenceMode.Link, AutoUpdateMode.Never)


Check out the CODESYS store:

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

Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 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