iLogic Titleblock Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I wrote a rule which works really well. When opening a new idw template an iLogic form appears asking how many sheets and what size. You select and the sheets populate with individual titleblocks for each sheet (don't ask why!!)....that all works great! However, I'm trying to fix the code so it's possible to change the name of the sheets. "Sheets" is a user parameter btw
*************************************
For i=1 To Sheets
If i>ThisDrawing.Document.Sheets.count Then
ThisDrawing.Document.Sheets.add
End If
ThisDrawing.Sheet("Sheet:" & CStr(i)).TitleBlock = "COMPANY NAME " & CStr(Sheet_Size) & " TB_" & CStr(i)
ThisDrawing.Sheet("Sheet:" & CStr(i)).Border = "COMPANY NAME Border_" & CStr(Sheet_Size)
ThisDrawing.Sheet("Sheet:" & CStr(i)).ChangeSize ("" & CStr(Sheet_Size), Moveborderitems := True)
Next
If Parameter("Sheet_Size") = "A0" Then ActiveSheet.ChangeSize("A0", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A0_S" Then ActiveSheet.ChangeSize("A0", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A1" Then ActiveSheet.ChangeSize("A1", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A1_S" Then ActiveSheet.ChangeSize("A1", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A2" Then ActiveSheet.ChangeSize("A2", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A2_S" Then ActiveSheet.ChangeSize("A2", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A3" Then ActiveSheet.ChangeSize("A3", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A3_S" Then ActiveSheet.ChangeSize("A3", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A4" Then ActiveSheet.ChangeSize("A4", MoveBorderItems := True)
ElseIf Parameter("Sheet_Size") = "A4_S" Then ActiveSheet.ChangeSize("A4", MoveBorderItems := True)
Parameter.UpdateAfterChange = True
End If
InventorVb.DocumentUpdate()
ThisApplication.ActiveView.Fit
*******************************
If I change "Sheet" to Left(oSheet.Name,(Len(oSheet.Name) - 1)) in line 6,7 and 8 I would expect the rule to work however it does not. Can anyone help?
Thanks,
Lewis
