Database.SaveAs Avoid Resetting view

Database.SaveAs Avoid Resetting view

drewj
Enthusiast Enthusiast
474 Views
2 Replies
Message 1 of 3

Database.SaveAs Avoid Resetting view

drewj
Enthusiast
Enthusiast

I am attempting to batch process multiple dwg's.

 

I am sideloading the database, then after changes are made I use Database.SaveAs.

 

The resultant file saves with the modifications, however the saved file has its view reset.

 

The dwgs view have a Roll Angle to account for a building that is not drawn orthogonally, but this dissapears in the saveas file.

 

Anyway around this?

 

Should I be using a different workflow?

 

Thanks for any guidance

 

Drew

0 Likes
475 Views
2 Replies
Replies (2)
Message 2 of 3

ActivistInvestor
Mentor
Mentor

@Anonymous wrote:

I am attempting to batch process multiple dwg's.

 

I am sideloading the database, then after changes are made I use Database.SaveAs.

 

The resultant file saves with the modifications, however the saved file has its view reset.

 

The dwgs view have a Roll Angle to account for a building that is not drawn orthogonally, but this dissapears in the saveas file.

 

Anyway around this?

 

Should I be using a different workflow?

 

Thanks for any guidance

 

Drew


I'm not sure what Roll Angle means (View Twist?), but I don't seem to have a problem with Database.SaveAs() loosing the current view. When I open a file saved via SaveAs(), even as a side database, the view that was current when the file was last saved in the AutoCAD editor, remains intact.

 

Is the view that is being lost in a layout viewport or the model tab?

 

0 Likes
Message 3 of 3

norman.yuan
Mentor
Mentor

If the changes made in the processing includes changes to layout (such as changing layout name), then there is a recent discussion here

 

https://www.theswamp.org/index.php?topic=53680.0

 

without solution proposed.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes