AnsweredAssumed Answered

"Zone" information of drawing via API

Question asked by Steven Barry on Oct 12, 2015



I am a newbie to SolidWorks API, but I am trying to use it to accomplish some fairly simple tasks.  I am trying to programatically update the drawing sheet template of a large group of files.  I found that IDrawingDoc.SetupSheet6 seems to be able to successfully update the template, but I also noticed it has quite a few non-optional "Zone" parameters (margins, rows, columns).


I want to be able to maintain whatever parameters are currently on the sheet, but ISheet.GetProperties does not return any zone information.  I don't want to have to assume values for these parameters, just in case I get a drawing that has something out of the ordinary.


How can I get the Zone margins, rows and columns via API?  Is there a better way to update my sheet template?


Note:  I already tried ISheet.SetProperties and ISheet.SetTemplateName together to change the template, but it didn't seem to update.

I am using SolidWorks 2015.


Added note:  For anyone reading having the same question:  I noticed SW 2016 version has added the method ISheet.ReloadTemplate. I bet this would help make the SetTemplateName method work out.  Too bad we haven't upgraded yet!



- Steven