FindText“API”,带有acad 2007 32位
- '#define AC_SRCH_BLOCK 0x01
- '#define AC_SRCH_DIM_TEXT 0x02
- '#define AC_SRCH_TEXT 0x04
- '#define AC_SRCH_LINK_DESC 0x08
- '#define AC_SRCH_LINK_URL 0x10
- '#define AC_SRCH_MATCH_CASE 0x20
- '#define AC_SRCH_WHOLE_WORD 0x40
- '#define AC_SRCH_DEFAULT 0x1F
- 'bool acdbTextFind(AcDbDatabase* pDatabase,
- ' AcDbObjectIdArray& resultSet,
- ' const ACHAR* findString,
- ' const ACHAR* replaceString = NULL,
- ' Adesk::UInt8 searchOptions = AC_SRCH_DEFAULT,
- ' const AcDbObjectIdArray& selSet = 0);
- Public Const AC_SRCH_BLOCK As Integer = 1
- Public Const AC_SRCH_DIM_TEXT As Integer = 2
- Public Const AC_SRCH_TEXT As Integer = 4
- Public Const AC_SRCH_LINK_DESC As Integer = 8
- Public Const AC_SRCH_LINK_URL As Integer = 16
- Public Const AC_SRCH_MATCH_CASE As Integer = 32
- Public Const AC_SRCH_WHOLE_WORD As Integer = 64
- Public Const AC_SRCH_DEFAULT As Integer = 31
- _
- Private Shared Function acdbTextFind(ByVal pDb As System.IntPtr, _
- ByVal resultSet As System.IntPtr, _
- ByVal findString As String, _
- ByVal replaceString As String, _
- ByVal searchOptions As Integer, _
- ByVal selSet As System.IntPtr) As Boolean
- End Function
- Public Shared Sub ZZ()
- Dim oidIn As New ObjectIdCollection
- Dim oidOut As New ObjectIdCollection
- Dim ret As Boolean
- Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
- ret = acdbTextFind(db.UnmanagedObject, oidOut.UnmanagedObject, "hello", Nothing, AC_SRCH_DEFAULT, oidIn.UnmanagedObject)
- If ret Then
- For Each id As ObjectId In oidOut
- '
- Next
- End If
- oidIn.Dispose()
- oidOut.Dispose()
- End Sub
有人能向我解释为什么不同的入口点签名依赖于x32或x64平台吗?我在第一篇文章中读到了这一点,但我不明白(我来自vba/vb6) |