Load an entire track from a trkpreset

I’m trying to load an entire track from a track preset that I created in Waveform. The preset contains a rack plugin. This works fine in Waveform but in my program, the Rack Instance - racktype is throwing an assertion because the racktype is null when the track tries to instantiate the plugin.
I assume this is because my method for creating the track (from a valuetree) doesn’t seem to call addRackTypeFrom(). Thus the rackType doesn’t exist in the edit.

What’s the correct way to achieve this?


Sorry for taking so long to see this.

There’s alot of fiddling we do in Waveform to add RackType XML to the preset file and then unpack it when it’s loaded. We also assign new IDs to all the contents to ensure they don’t clash and have to be careful that all the connections etc. of the Rack are updated correctly.

All the code is pretty Waveform specific so I can’t really share it but that’s the general idea.

Thanks for responding. I figured as much and implemented something along those lines. However, I get a Dangling ID found message when I load the edit. Any ideas why?

I should also add that this is after Remapping the EditItemID .