--- a +++ b/trunk/cforge/cforge/Package/CFORGE/Scripts/plcopen-export.py @@ -0,0 +1,31 @@ +import sys, os +import cds_script + + +# This is a cforge command (script file) +# this will be run as ironpython script. +# the filename of this script is automatically the corresponding cforge command +# with some magic functions you can easily integrate it nicely into cforge tool + +# cforge_usage: +# here you can return an array of all possible arguments and options that can +# be passed to this command script +def cforge_usage(): + help = [ + ["<path to CODESYS project>", "---"] + ] + + return help + + + +if len(sys.argv) <= 1: + print("Oh, there are no arguments. Perhaps you forgot something?") + sys.exit() + +scriptpath = "C:\\Users\\Stefan\Projekte\\SVN\\Forge\\cforge\\trunk\\scripts\\" + +scriptname = os.path.join(scriptpath, "action.plcopenxml.export.py") +scriptargs = sys.argv[1] + +cds_script.RunCodesysWithScript(scriptname, scriptargs) \ No newline at end of file