To replace or swap doors is different than placing them.
To place the doors via ruby, you can adapt the rectangle tool example, however this requires knowledge of Ruby programming.
The result would be a personal tool to meet your needs. The cost for someone to create it for you would be considerable.
Generally DCs include the doors and these are swapped.
Methods vary, the most common is to hide alternatives, this tends towards file bloat, but is effective for a small range.
You can make each door swap-able by using the CURRENT formula in parent and referencing the size in a child that contains the geometry. However SketchUp only allows you to swap one component at a time, even though the help documentation says you can. Note that changing the instances via the component browser does not update to individual sizes,
If you are considering Ruby without any programming knowledge, then I recommend you invest in one of the cabinet extensions, if there is any short comings, then explain it to the developer. they are generally willing to oblige as it helps them to update and reach a wider customer base. The cost will be significantly less, especially in time.