HJWO-
I'm working with Soggy3 to try and get this nailed down, but ultimately I'm still struggling.. The chunk of code doesn't seem to behave as I'd expect, however I may not be 'integrating' it properly..
Ideally, whatever iLogic we develop would not only set the active dimension style for a given sheet size, but it would also update and/or change any current dimensions and text (items controlled by the dimension style) to the desired dimension style -
The 'director' of the template file is the form that directs the code to set sheet size, borders, title blocks, client entries and drawing type...
The workhorse is our Sheet Size/Format rule -
''If selection "MTSI A" is selected, what options will be activated?
kLandscapePageOrientation = 10242
kPortraitPageOrientation = 10243
If Drawing_Sheet_Size = "MTSI A" Then
ActiveSheet.ChangeSize("A", MoveBorderItems := True)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = kPortraitPageOrientation
ActiveSheet.Border = "8 1/2 X 11"
'ActiveSheet.TitleBlock = "MTSI A"
ActiveSheet.SetTitleBlock("MTSI A", Dwg_Type)
ThisApplication.ActiveView.Fit
''If selection "MTSI A, [IPB]" is selected, what options will be activated?
ElseIf Drawing_Sheet_Size = "MTSI A - IPB" Then
ActiveSheet.ChangeSize("A", MoveBorderItems := True)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = kPortraitPageOrientation
ActiveSheet.Border = "A SIZE - IPB"
ActiveSheet.TitleBlock = "MTSI A - IPB"
ThisApplication.ActiveView.Fit
''If selection "MTSI B" is selected, what options will be activated?
ElseIf Drawing_Sheet_Size = "MTSI B" Then
ActiveSheet.ChangeSize("B", MoveBorderItems := True)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = kLandscapePageOrientation
ActiveSheet.Border = "11 X 17"
'ActiveSheet.TitleBlock = "MTSI B"
ActiveSheet.SetTitleBlock("MTSI B", Dwg_Type)
ThisApplication.ActiveView.Fit
''If selection "MTSI D" is selected, what options will be activated?
ElseIf Drawing_Sheet_Size = "MTSI D" Then
ActiveSheet.ChangeSize("D", MoveBorderItems := True)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = kLandscapePageOrientation
ActiveSheet.Border = "22 X 34"
'ActiveSheet.TitleBlock = "MTSI D"
ActiveSheet.SetTitleBlock("MTSI D", Dwg_Type)
ThisApplication.ActiveView.Fit
End IfAm I correct in assuming that your chunk of code would be added to the lines under each If/Elseif segments?
Cheers!