求助:GetTopLevelBlocks是在哪定义的?
Dim myDB As New Database(False, True)myDB.ReadDwgFile(ligneF, IO.FileShare.ReadWrite, True, "")
Using mytrans As Transaction = myDB.TransactionManager.StartTransaction
For Each myBlockName As String In GetTopLevelBlocks(myDB)
For Each BRefID As ObjectId In GetBRefIDs(myDB, myBlockName)
If myBlockName = "DANCART" Then
。。。
如上代码,在vb2008 express里说GetTopLevelBlocks没定义。应该import什么模块?
谢谢
是 这个函数么, 在这里看来的
http://forums.augi.com/showthread.php?t=135845
Function GetTopLevelBlocks(ByVal DatabaseIn As Database) As List(Of String)
Dim myList As New List(Of String)
Using myTrans As Transaction = DatabaseIn.TransactionManager.StartTransaction
Dim myBT As BlockTable = DatabaseIn.BlockTableId.GetObject(OpenMode.ForRead)
For Each myBTRid As ObjectId In myBT
Dim myBTR As BlockTableRecord = myBTRid.GetObject(OpenMode.ForRead)
If myBTR.IsAnonymous = False And myBTR.IsLayout = False And _
myBTR.IsFromExternalReference = False And _
myBTR.IsDependent = False Then
myList.Add(myBTR.Name)
End If
Next
End Using
Return myList
End Function 原来如此。还以为是公有函数呢。原来是自己编的。
还有这个函数GetBRefIDs。
只能自己想了。
谢谢
页:
[1]