export_xml vs. export_native

Infusion
2015-03-11
2015-03-11
  • Infusion - 2015-03-11

    Hello,

    does anyone know the exact differences (regarding the content) between IScriptObjekt.export_xml and IScriptObjekt.export_native ?

    I want to recursively export all objects
    - with export_native it works
    - with export_xml there it always says that the set and get accessors are not exportable

    I want to search for unique code numbers in the exported code
    - with export_native it works
    - with export_xml the programm alsways finds the unique numbers several times in different files

    So the question is, what objects do I have to export with export_xml to get all the written code from the Project ?

    Best regards
    Florian

     
  • mkeller - 2015-03-11

    Hi Infusion.

    Infusion hat geschrieben:
    does anyone know the exact differences (regarding the content) between IScriptObjekt.export_xml and IScriptObjekt.export_native ?

    One method uses the PLCopen XML format and the other the CODESYS native XML format.

    Infusion hat geschrieben:
    - with export_xml there it always says that the set and get accessors are not exportable

    Maybe they are not part of the PLCopenXML specification. I haven't read the specification.

    Infusion hat geschrieben:
    - with export_xml the programm alsways finds the unique numbers several times in different files

    I think some objects can't be exported without their parent object. Have you tried to export the whole project in one file?

    Infusion hat geschrieben:
    So the question is, what objects do I have to export with export_xml to get all the written code from the Project ?

    If you use CODESYS version V3.5 SP6 or newer and the relevant code is only in ST you could use the interface IScriptTextualObjectMarker to find the relevant objects and with the interface IScriptTextDocument of these objects you could manipulate the ST code directly.

    BR
    Martin

     

Log in to post a comment.