Almost there!
I've managed to automate creation of them models using a 2D array created from parsing a CSV storing all the relevant data pertaining to each sheet size.
I can create the models, view groups etc... but what I don't have working is setting the sheet size to the correct formname.
- My Sheetsizes.def file contains all the possible variations
- My array contains a column specifying the same string of text that is visible on the sheet size pulldown set in the Sheets.def file
- I can see in the VBA locals window that the correct value is being used
- How am I setting the size in code is:
... Set oSheet = ActiveModelReference.GetSheetDefinition With oSheet .FormName = ArraySheets(R, 3) .SheetName = ArraySheets(R, 2) .Height = ArraySheets(R, 4) .Width = ArraySheets(R, 5) ActiveModelReference.SetSheetDefinition oSheet End With ...
I only added .height and .width as a last resort because the size pull-down doesn't display the correct value nor does the sheet boundary appear. My understanding is that I shouldn't need these values because the string in .formname matches an entry in sheetsizes.def and set the values automatically. This is what my model dialog shows for the first sheet:
Size pull-down should display ISO A0 (Landscape) but it doesnt. I can select it manually but I shouldn't have to.
Any idea where I am going wrong??