It seems Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication
ONLY apply to the document currently displayed in autocad.
Maybe I am missing a step but let me try to explain the problem again.
I have a drawing (drawing1) open.
I run my command that creates a NEW database in memory.
I insert a block in the NEW database (in memory) and I want to
Zoom extents and then save the database (drawing2).
When I use the examples in this forum including yours it zoom extents alright but in drawing1, not the new database.
I am still learning so I could be overlooking something
Any help is appreciated.
Maybe I can come at it from a different angle then.
When I complete the operations to the database save it and then open it as a drawing in AutoCAD, the view has been set for me, not where I would like (the extents of the block inserted)
How does one control where the initial view is located when creating a database?
Or is that view default and the need to specify has been overlooked?
Is there a way to "zoom" a database?
I made my comment based on my attempts at doing just that. I browsed the object model but saw no zoom functionality associated with the databaseservices. I only found zoom used with the application object and that only effected the active document.
Am I missing something? I know that there are plenty of undocumented or otherwise hidden pieces to the programming puzzle.
By the way, your CommandLine.cs worked fine for zooming but again that would only work on the currently active drawing.