DraftSight API questions: Sheet format and scale

Hello,

I'm a software engineer not knowing a lot about DraftSight. We have a need for a add-in which can change a sheet format in a new or existing drawing and to allow user to select sheet scale from a list of scales.

I assume the sheet format can be changed by selecting one of the template files. There is a method in API to do that for a new drawing. But how to implement that for an existing drawing? Is it possible at all?

For updating scale I found methods for Viewport (IViewport.CustomScale, IViewport.StandardScale and IViewport.LineScale), Is it that how to change the scale of a sheet? Changing it for each viewpoint in a sheet?

Thanks a lot,

                                  Hilkka