Hi @waynehelley. The task of transitioning what could potentially be a large number of features of various types from one weldment sub-environment, to another crossed my mind before too, but I did not fully explore that possibility. If there was just 1 or two very basic features like extrude cut type features, then it might be manageable, but the thought of trying to write a code solution so dynamic that it could handle an unknown number of every other possible type of feature boggles the mind. One of the very challenging aspects of that task would be that you can only 'edit' one of those sub-environments at a time. What I mean by sub-environments are the Welds, Machining, & Preparations within a weldment type assembly. Each must be activated (enter into its Edit mode) before changes can be made.
As for the PostPrivateEvents and/or SendKeys related codes...if that dialog that shows when you execute that command is Modal (retains top focus while it is open, so you can not do other things while it is open), which I believe that it is, then any code you try to 'send' to that dialog after it has been launched will ineffective. The rule will likely remain paused while it is showing, which is what happens when you launch an iLogic Form as Modal, then continue after it is closed. However, if it is modal, it may be possible to use the PostPrivateEvents lines before the command is launched, then maybe the command might use that data. There are certain routines involving file dialogs that can work that way. But realistically this is all just theoretical guessing. Only the folks at Autodesk would actually know for sure if this is even possible, and if so, how to accomplish it.
If you figure something out that is working for you, please let us know about it. This would definitely be useful. In the mean time, you could search the Inventor Ideas forum and see if there are any existing ideas in there for making this process easier through the API, and if there are none, you could create a post there about this. Then paste a link there to this forum topic, and past a link here to that Ideas post. If the idea gets enough votes, it could get implemented in a future release of Inventor. Some ideas get implemented without that many votes, if they are fairly easy to make happen.
Wesley Crihfield

(Not an Autodesk Employee)