But how does the feedback pin work - have you thought about that?
The key here is that the feedback pin looks at the voltage that is fed back to it (hence the name) from the output of the regulator. This is how it regulates - if the output rises, it quenches, if it drops, the regulator opens up - simply put, in layman's terms.
If you put a DAC and some kind of controller into this feedback loop, you're making the regulator dependent on the operation and speed of that controller to look at the output voltage and translate this into a sensible output to the FB pin on your regulator. Getting that to run stably may be a bit of a challenge - without it oscillating and quite possibly going into a meltdown mode.
Whether your circuit works or not is debatable, but one thing is clear: the fact that you're using the R1/R2 divider as well as a DAC/PWM input implies that you're mixing up two modes of control. So even if this works, it's only by virtue of whatever DAC or PWM circuit you have overdriving the feedback signal derived from the output through R1. Then why have R1 to begin with - which brings the question what purpose R2 has. That, in turn, depends on the control circuitry we don't see - as does the entire functioning of the setup.
If you want a programmable output voltage, the most sensible thing to do is to select a converter that is explicitly made for this by accepting some kind of input that sets the output voltage, while the regulator can maintain its own feedback loop. Alternatively, you could use a higher input voltage than necessary and take some kind of DC-coupled power amplifier that you set to the desired level.
However, all this is kind of hypothetical, because any sane design exercise along these lines would have to start by making a couple of requirements explicit: what is the voltage range you need to generate, what is the input voltage available, what kind of loads are you expecting to power, what is the required output filtering/what kinds of noise (qualitatively and quantitatively) are acceptable, what kind of safety features are required (overcurrent, overvoltage, short circuit protection etc.), what's the required efficiency/maximum dissipation in the converter - and probably a few others.
The more you try to keep your options open by basically saying "as high/clean/powerful/etc as possible", the more complicated the design effort will be.
If this is about basically building a variable lab power supply, in all honesty, save yourself the trouble and just buy one. They're affordable these days.



