<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Export XML</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/</id><updated>2020-02-27T14:43:33.323000Z</updated><subtitle>Recent posts to Export XML</subtitle><entry><title>Export XML</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/?limit=25#97a7" rel="alternate"/><published>2020-02-27T14:43:33.323000Z</published><updated>2020-02-27T14:43:33.323000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.come0651b86abb528a6b7f3ef2a980758b0b50cf1a3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lohr_DCIA-EHE1 hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
The export-file has been created. &lt;br/&gt;
But the the properties and methods of the function block are missing. If I try to find a property and to export it as XML-File an error message of the reporter shows, that the property is not exportable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Properties alone are not exportable, as properties cannot exist without their parents. If you export manually (via the project menu "Export PLCOpenXML..." command), you cannot select a property without the parent node being selected.&lt;/p&gt;
&lt;p&gt;However, POUs should be exported with all their properties etc. if the "recursive" parameter is set to True. In our internal test cases, it works(the PLCOpenXML files contain the properties).&lt;/p&gt;
&lt;p&gt;If it is not working for you, it's best if you contact me via our support department, giving detailed steps to repeat (possibly including an example project archive).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Export XML</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/?limit=25#6cf1" rel="alternate"/><published>2020-02-27T14:43:32.798000Z</published><updated>2020-02-27T14:43:32.798000Z</updated><author><name>Lohr-DCIA-EHE1</name><uri>https://forge.codesys.com/u/lohr-dcia-ehe1/</uri></author><id>https://forge.codesys.comac80462677ea244ba00054b09116d71925403275</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The export-file has been created. &lt;/p&gt;
&lt;p&gt;But the the properties and methods of the function block are missing. If I try to find a property and to export it as XML-File an error message of the reporter shows, that the property is not exportable.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Export XML</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/?limit=25#93f0" rel="alternate"/><published>2020-02-27T14:43:32.246000Z</published><updated>2020-02-27T14:43:32.246000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comfcb5a9c3cf937af729065c3be70c5599cd1c698c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lohr_DCIA-EHE1 hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I want to export the properties of the function block (FB) named "MX_DirectVarAxis".&lt;br/&gt;
The function block has properties and methods.&lt;br/&gt;
The following script does not work:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As far as I can see, the script looks fine.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
The script showed the following messages:&lt;br/&gt;
  ...&lt;br/&gt;
  reporter = Reporter()&lt;br/&gt;
  proj = projects.primary&lt;br/&gt;
  obj = proj.find("MX_DirectVarAxis", True)&lt;span&gt;[0]&lt;/span&gt;&lt;br/&gt;
  print obj.get_name()&lt;br/&gt;
  MX_DirectVarAxis&lt;br/&gt;
  obj.export_xml(reporter, str_PathXmlFile, True)&lt;br/&gt;
  calling(self: IronPython.NewTypes.System.Object#IExportReporter_1$1)&lt;br/&gt;
  def aborting(self:)&lt;br/&gt;
  return False&lt;br/&gt;
  ...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That looks like a trace of a successfull run of the script.&lt;/p&gt;
&lt;p&gt;Did you get any error messages or exceptions? Was the TestExp.xml file created?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Export XML</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/0cd1b30f05/?limit=25#0c6d" rel="alternate"/><published>2020-02-27T14:43:30.745000Z</published><updated>2020-02-27T14:43:30.745000Z</updated><author><name>Lohr-DCIA-EHE1</name><uri>https://forge.codesys.com/u/lohr-dcia-ehe1/</uri></author><id>https://forge.codesys.com24f2b22657c9c0f5d2683bfde987e95aa6330140</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I want to export the properties of the function block (FB) named "MX_DirectVarAxis".&lt;br/&gt;
The function block has properties and methods.&lt;/p&gt;
&lt;p&gt;The following script does not work:&lt;/p&gt;
&lt;p&gt;import sys&lt;/p&gt;
&lt;p&gt;str_PathXmlFile = "C:\TestScripts\TestExp.xml"&lt;/p&gt;
&lt;p&gt;# create the export reporter&lt;br/&gt;
class Reporter(ExportReporter):&lt;br/&gt;
   def error(self, message):&lt;br/&gt;
      system.write_message(Severity.Error, message)&lt;/p&gt;
&lt;p&gt;def warning(self, message):&lt;br/&gt;
      system.write_message(Severity.Warning, message)&lt;/p&gt;
&lt;p&gt;def nonexportable(self):&lt;br/&gt;
      print("non exportable")&lt;/p&gt;
&lt;p&gt;@property&lt;br/&gt;
   def aborting(self):&lt;br/&gt;
      return False&lt;/p&gt;
&lt;p&gt;# create the exporter instance.&lt;br/&gt;
reporter = Reporter()&lt;/p&gt;
&lt;p&gt;proj = projects.primary&lt;/p&gt;
&lt;p&gt;obj = proj.find("MX_DirectVarAxis", True)&lt;span&gt;[0]&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;print obj.get_name()&lt;/p&gt;
&lt;p&gt;obj.export_xml(reporter, str_PathXmlFile, True)&lt;/p&gt;
&lt;p&gt;The script showed the following messages:&lt;/p&gt;
&lt;p&gt;...&lt;br/&gt;
  reporter = Reporter()&lt;br/&gt;
  proj = projects.primary&lt;br/&gt;
  obj = proj.find("MX_DirectVarAxis", True)&lt;span&gt;[0]&lt;/span&gt;&lt;br/&gt;
  print obj.get_name()&lt;br/&gt;
  MX_DirectVarAxis&lt;br/&gt;
  obj.export_xml(reporter, str_PathXmlFile, True)&lt;br/&gt;
  calling(self: IronPython.NewTypes.System.Object#IExportReporter_1$1)&lt;br/&gt;
  def aborting(self:)&lt;br/&gt;
  return False&lt;br/&gt;
  ...&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>