Hi,
Just giving an update if anyone stumbles across this.
I knew about linking iProperties but I needed a property that would be variable across every sheet or would need to create a lot of iProperties.
I was hoping that there was a simple override for Sheet numbering to start at a number other than one but this doesnt seem to be the case.
Instead I used an iLogic routine to create a text box on every page and populated it with input parameters. This works well but is not adaptive - cannot change the sheet numbering without deleting the box and starting again.
This is the thread that I got the text box creation help here.
Also below I have posted my final code that I use. I am aware it is propably a bit rough but I am new to this and it does everything I want.
'setting up document/sheets etc
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oSheets As Sheets
oSheets = ThisDoc.Document.sheets
Dim oSheet As Sheet
Dim startsheet As Integer
Dim endsheet As Integer
Dim numsheets As Integer
Dim tblock As String
Dim tborder As String
Dim tsize As String
'getting user inputs for the sheet number to start at, the total number of sheets and the amount of sheets in this file
startsheet = InputBox("Sheet to start drawing at", "Sheet Numbering")
endsheet = InputBox("Total number of sheets in drawing","Sheet Numbering")
numsheets = InputBox("Number of sheets in this file","Sheet Numbering")
'set i = to the sheet number to start at and get the titleblock/border etc for the first sheet (so all sheets are identical)
i = startsheet
tblock=ActiveSheet.TitleBlock
tborder=ActiveSheet.Border
tsize=ActiveSheet.Size
'create the number of sheets needed
createsheet: If oDrawDoc.Sheets.Count <numsheets Then
ThisApplication.ActiveDocument.Sheets.add ()
Goto createsheet
End If
'loop through every sheet and add in text that is formatted to a certain size
For Each oSheet In oSheets
oSheet.activate
Dim oGeneralNotes As GeneralNotes
oGeneralNotes = oSheet.DrawingNotes.GeneralNotes
Dim oTG As TransientGeometry
oTG = ThisApplication.TransientGeometry
Dim sText As String
sText = "Sht "& i &" of "& endsheet
Dim sFormattedText As String
sFormattedText = "<StyleOverride FontSize = '0.35'>" & sText & "</StyleOverride>"
Dim oGeneralNote As GeneralNote
oGeneralNote = oGeneralNotes.AddFitted(oTG.CreatePoint2d(37.5, 3), sFormattedText)
i=i+1
Next
'loop through every sheet and set titleblocks/borders etc
i=startsheet
For Each oSheet In oSheets
oSheet.activate
ActiveSheet.TitleBlock = tblock
ActiveSheet.Border = tborder
ActiveSheet.ChangeSize(tsize, MoveBorderItems := True)
'loop through and rename sheets to the new sheet numbering oSheet.Name = "Sheet" & i
i=i+1
Next
'goto first sheet
ActiveSheet = ThisDrawing.Sheet("Sheet" & startsheet & ":1")
Thanks,
Tom