Hello,
I am using the VFC_read_xml to read bushing splines in python:
from mdi.afc import vfc
xml = vfc.read_xml("mdi_0001_bus.xml")
# To get the stiffness
xml.child(type=vfc.ConnectorBushingProperties).x().stiffness().linear_data().rate()
# To get the spline values
xml.child(type=vfc.ConnectorBushingProperties).x().stiffness().spline_data().x_data()
xml.child(type=vfc.ConnectorBushingProperties).x().stiffness().spline_data().y_data()
I loop over all bushing files in assembly and use the spline data for calculation of the stiffness for each bushing.
The problem is that with this method the stiffness values evaluated from first xml file are used in all xml files and in values evaluated from first bus file after the processing of the XML file:
I asume that if I clear the xml at the and of the python function, then the problem will be solved.
I have tried
xml = None
but unfortunately it has not worked and there is no documentation for VFC - only the compiled vfc_xml.pyc can be found in ADAMS installation.
Does anybody has an idea if there is VFC function to clear the xml or how to empy xml?
Thanks,
Ondrej
You can find the original feed :How to read values from XML file?