How does one achieve the effect of the Edit menu > InCopy > Add layer to assignment > (new/existing assignment)? I'd like to heed the JS Scripting Guide's note to avoid scripting menuActions & user UI selections, but I have yet to find a forum post addressing this.
The goal is to create an InCopy assignment package of the working document's body text layer to serve as a proof; no need for it to be connected to the original, like a real assignment, since it's destined for a one way trip. So far I save a copy of the ID document, create an empty assignment, and started down the path of iterating through the document's textframes, querying for the correct itemLayer, thinking they can be added to the assignment--but this seems inelegant, and probably the incorrect approach. I'd also like to pass a default path+filename, so it seems like I'd need to access the dialog that appears in the UI.