Saving Instrument And Dsp Chain As Preset

Is it possible to save the loaded instrument AND the DSP Chain as a preset? If not, is it possible to achieve this using lua and the API?

Thanks