API call to export PDM settings (including add-ins) to CEX file?

Is there such an API call to do this? If not, can this be done in another way?