I have a program that has a chunk of code that sets the WorkView to "Back" but I get this error when replacing the view.
/////////////////////////////////////////// Exception: NXOpen.NXException Error Code: 925019 Message: View to be replaced is not in layout TargetSite: Void ReplaceView(NXOpen.ModelingView, NXOpen.ModelingView, Boolean) ///////////////////////////////////////////
It means that the first argument (the current view to be replaced) is incorrect. The arguments to .ReplaceView are: a view (the old, or current, view), a view (the new view you want to use), and a boolean value that specifies if you want to perform a "fit view" after the view is replaced.
If you are working in a single view layout, you can pass in the current work view as the first argument:
If you are working in a multi-view layout, you'll need to specify a view that is currently in the layout.