i'm running the following VBA application that is supposed to take the text from an autocad drawing and copy it to an excel spreadsheet, but when i try to debug it highlights "vbdPowerSet" and says:
compile "error: sub or function not defined"
i have a feeling i'm not referencing the vbdpowerset correctly, but can't find it in my reference when i check.
what should i do?
Public Sub GetText()
Dim objSelSet As AcadSelectionSet
Dim objEnt As AcadText
Dim intType(1) As Integer
Dim varData(1) As Variant
Dim intRow As Integer
Dim varAtts As Variant
Dim MyVar As Range
Dim DB As Workbook
Dim CP As Worksheet
Set DB = Application.ActiveWorkbook
Set CP = DB.ActiveSheet
On Error GoTo Err_Handler
Set objAcad = Nothing
Set objSelSet = vbdPowerSet("gettext")
intType(0) = 0
varData(0) = "TEXT,MTEXT"
objSelSet.Select acSelectionSetAll, _
filtertype:=intType, filterdata:=varData
intRow = 1
For Each objEnt In objSelSet
With objEnt
CP.Cells(intRow, 1).Value = objEnt.TextString
End With
intRow = intRow + 1
Next objEnt
ThisDrawing1.ActiveSpace = acPaperSpace
Exit_Here:
Exit Sub
Err_Handler:
MsgBox Err.Number & " " & Err.Description
End Sub
compile "error: sub or function not defined"
i have a feeling i'm not referencing the vbdpowerset correctly, but can't find it in my reference when i check.
what should i do?
Public Sub GetText()
Dim objSelSet As AcadSelectionSet
Dim objEnt As AcadText
Dim intType(1) As Integer
Dim varData(1) As Variant
Dim intRow As Integer
Dim varAtts As Variant
Dim MyVar As Range
Dim DB As Workbook
Dim CP As Worksheet
Set DB = Application.ActiveWorkbook
Set CP = DB.ActiveSheet
On Error GoTo Err_Handler
Set objAcad = Nothing
Set objSelSet = vbdPowerSet("gettext")
intType(0) = 0
varData(0) = "TEXT,MTEXT"
objSelSet.Select acSelectionSetAll, _
filtertype:=intType, filterdata:=varData
intRow = 1
For Each objEnt In objSelSet
With objEnt
CP.Cells(intRow, 1).Value = objEnt.TextString
End With
intRow = intRow + 1
Next objEnt
ThisDrawing1.ActiveSpace = acPaperSpace
Exit_Here:
Exit Sub
Err_Handler:
MsgBox Err.Number & " " & Err.Description
End Sub