''' <summary> ''' 读取选中表格的第row行第col列值 ''' </summary> ''' <param name="row">行</param> ''' <param name="col">列</param> ''' <returns></returns> PublicFunction GetTableInfo(ByVal row AsInteger, ByVal col AsInteger) AsString Dim tableOwner As IpfcTableOwner Dim table As IpfcTable Dim tablecell As IpfcTableCell Dim cellnote As IpfcModelItem Dim detailNoteItem As IpfcDetailNoteItem Dim detailNoteInstructions As IpfcDetailNoteInstructions Dim i AsInteger GetTableInfo = "未能读取到内容。" Try If Isdrawding() = TrueThen tableOwner = CType(asyncConnection.Session.CurrentModel, IpfcTableOwner) If HasTable() = TrueThen table = SelectObject("dwg_table").SelItem tablecell = (New CCpfcTableCell).Create(row, col) cellnote = table.GetCellNote(tablecell) If cellnote IsNotNothingThen If cellnote.Type = EpfcModelItemType.EpfcITEM_DTL_NOTE Then detailNoteItem = CType(cellnote, IpfcDetailNoteItem) detailNoteInstructions = detailNoteItem.GetInstructions(True) GetTableInfo = “” If detailNoteInstructions.TextLines.Item(0).Texts.Count > 0Then For i = 0To detailNoteInstructions.TextLines.Count - 1 GetTableInfo += detailNoteInstructions.TextLines.Item(0).Texts.Item(0).Text Next EndIf EndIf EndIf EndIf EndIf Catch ex As Exception MsgBox(ex.Message.ToString + Chr(13) + ex.StackTrace.ToString) EndTry Return GetTableInfo EndFunction