DFXMLExporter
component#
Inputs:
|
Button to export the xml. |
|
The folder where to export the xml. |
|
The assembly object |
Outputs:
o_xml |
The string of xml to be exported. |
Code:
#! python3
from ghpythonlib.componentbase import executingcomponent as component
class DFXMLExporter(component):
def RunScript(self,
i_dump: bool,
i_export_dir,
i_assembly):
# dump the xml
o_xml = None
xml: str = i_assembly.to_xml()
if i_dump:
i_assembly.dump_xml(xml, i_export_dir)
o_xml = xml
return o_xml