你有种再说一遍
发表于 2025-5-6 23:26:37
试试,我也是根据网友说的制作的,没有验证过
https://www.cnblogs.com/JJBox/p/18833875
tiancao100
发表于 7 天前
这是我引用T20V10的文件, 类库,framework 4.7.2,单行文字就是Text, 多行文字没找到。我上面的回复是错的抱歉。
tiancao100
发表于 7 天前
本帖最后由 tiancao100 于 2025-5-7 10:10 编辑
VB.net 读取天正建筑多行文字方法1~3
https://mp.weixin.qq.com/s/4GoyC3PZf5PuG3aF-y4AsQ
读取多行文字内容
Shared Function GetTchMText(ByVal ID As ObjectId) As String
Dim doc As Document = Application.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Dim ename As Long() = New Long() {0, 0}
Dim result As Integer = acdbGetAdsName_R23_64(ename, ID)
Dim rb As New ResultBuffer()
Interop.AttachUnmanagedObject(rb, acdbEntGet(ename), True)
Dim iter As ResultBufferEnumerator = rb.GetEnumerator()
Dim DXF As New ArrayList
While iter.MoveNext()
Dim TmpVal As TypedValue = iter.Current
If TmpVal.TypeCode = 1 Then
Dim strValue As String = (If(TmpVal.Value IsNot Nothing, TmpVal.Value.ToString(), "*Nothing*"))
Return strValue
Else
Continue While
End If
End While
Return Nothing
End Function
James_
发表于 7 天前
tiancao100 发表于 2025-5-7 09:55
这是我引用T20V10的文件, 类库,framework 4.7.2,单行文字就是Text, 多行文字没找到。我上面的回复是错 ...
你电脑是什么系统,我Windows11
C:\Users\Administrator\source\repos\ClassLibrary8\ClassLibrary8\obj\Debug\Interop.COMKERNALLib.dll这个路径找不到这个文件啊,用Everything搜了也搜不到。
tiancao100
发表于 7 天前
James_ 发表于 2025-5-7 13:49
你电脑是什么系统,我Windows11
C:%users\Administrator\source\repos\ClassLibrary8\ClassLibrary8\obj ...
引用tch10_com23.dll时候自动生成
James_
发表于 7 天前
tiancao100 发表于 2025-5-7 15:40
引用tch10_com23.dll时候自动生成
这个文件引用不了啊,跳错误见我前面几楼。
James_
发表于 7 天前
tiancao100 发表于 2025-5-7 15:40
引用tch10_com23.dll时候自动生成
引用tch10_com23.dll的时候,跳错:未能添加对“C:\Tangent\TArchT20V10\sys23x64\tch10_com23.dll”的 引用。请确保此文件可访问并且是一个有效的程序集或COM组件。
James_
发表于 7 天前
tiancao100 发表于 2025-5-7 09:55
这是我引用T20V10的文件, 类库,framework 4.7.2,单行文字就是Text, 多行文字没找到。我上面的回复是错 ...
框架改成4.7.2了还是无法添加引用。
Bao_lai
发表于 3 天前
直接用dynamic可以获得单行的,多行还不知道。
James_
发表于 3 天前
Bao_lai 发表于 2025-5-11 08:27
直接用dynamic可以获得单行的,多行还不知道。
多行我试了,不行