Message 1 of 6
osheet

Not applicable
07-27-2018
01:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i have some coding and keep getting the error "oSheet" is not declared coding below
SyntaxEditor Code Snippet
'START Quit=MessageBox.Show("Do you wish to run this rule?","title",MessageBoxButtons.YesNo) If Quit=7 Then Exit Sub End If TableCheck:'------------------------------------------------------'---------------start finding the table----------------'------------------------------------------------------ For i = 1 To oSheet.CustomTables.Count TableTitle = oSheet.CustomTables.Item(i).Title If TableTitle = "Operating Conditions" Then 'Remember the table number for editing section TableNr = i 'If table found jump to edit section Goto EditTable End If Next '------------------------------------------------------'---------------end finding the table----------------'------------------------------------------------------ 'CreateTable:'------------------------------------------------------'---------------start creating the table---------------'------------------------------------------------------' Set the column titles oTitles = New String(){"Item", "Description"}' ' ' ' Create the custom table oCustomTable = oSheet.CustomTables.Add("Operating Conditions", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), _ 2, 11, oTitles,oContents, oColumnWidths) '------------------------------------------------------'---------------finish creating the table---------------'------------------------------------------------------'edit the table by restarting the check routine Goto TableCheck EditTable:'------------------------------------------------------'---------------start editing the table---------------'------------------------------------------------------'Get the name Of the first model in the drawing modelName = IO.Path.GetFileName(ThisDrawing.ModelDocument.FullFileName) 'MessageBox.Show(modelName, "ilogic")' ' ' ' '------------------------------------------------------'---------------finish editing the table---------------'------------------------------------------------------