PRELIMINARY-IMAGE This is a preliminary API until 2020.Apr and may be improved based on user feedback. It is currently available in C++ and Python.

bool OEWriteDesignUnit(const std::string &fname,
                       const OEDesignUnit &du)
bool OEWriteDesignUnit(OEPlatform::oeostream &ofs,
                       const OEDesignUnit &du, unsigned type)

Write an OEDesignUnit named du to an OEDesignUnit (.oedu) file fname. This will overwrite the previous file if it existed.

The overload that takes an oeostream can be used to write multiple OEDesignUnits to the same destination. Note that the format must be specified by a constant from the OEDesignUnitFileType namespace as the type argument.

The function returns true if the file was written successfully, and false otherwise.

See also