I’m setting runtimeIds as per the following:
api.plugins.registerCommPluginAsync({
runtimeId: "myRuntimeId"
});
api.viewports.create({
runtimeID: "myRuntimeId"
});
When I use getRuntimeId() and getViewportRuntimeId(), what appears to be generated strings are returned. I’ve tried several variations in setting runtimeIds but, the results are always the same.
In the end, I’m relying on…
const viewports = api.viewports.get();
const runtimeID = viewports[index].getViewportRuntimeId();
api.viewports.destroy(runtimeID);
… to destroy viewport instances - which may ultimately be a better design decision - but, I believe there is something off in the behaviour or documentation of runtimeIds.
Note: runtimeId and runtimeID are as specified in the docs - ShapeDiver 3D Viewer Interface: ApiInterfaceV2