CAD/CAM discussion forum > CAD > VBA Entity Crash/table Run-Time Error

VBA Entity Crash/table Run-Time Error

    
  Subscribe Topic

Rank: 1

Marijan Glavac

Newbie

posts: 0

Registered: 2011-6-5

Message 1 of 3

25-03-2011 07:48 . pm   |   View his/her posts only
When I run code got message :
Run-time error '-2147467259 (80004005)'

Automation error
Unspecified error

That happends when is on drawing object-Table.Table was insert by another ACAD user.
When I delete Table evryting is OK !

Code :

Private Sub cmdStart_Click()
Debug.Print "==>PROCEDURA BLOCKEXPORT START"

Dim ImeBloka(1000) As String
Dim BrojBlokova As Integer
Dim i As Integer
Dim EntObj As ZwcadEntity
Dim blockOBj As ZwcadBlockReference
Dim ImaGa As Boolean
Dim Shema As ZwcadDocument
For Each EntObj In Shema.ModelSpace
'Debug.Print "**"; EntObj.EntityName; EntObj.EntityName
' EntObj.Copy
With EntObj
' Da li je entity block ?
If EntObj.EntityType = zcBlockInsert Then
Set blockOBj = EntObj
If blockOBj.HasAttributes Then
If BrojBlokova = 0 Then
ImaGa = False
Else
ImaGa = False
For i = 1 To BrojBlokova
If ImeBloka(i) = blockOBj.Name Then
ImaGa = True
Exit For
Else
ImaGa = False
End If
Next i
End If
If ImaGa = False Then
BrojBlokova = BrojBlokova + 1
ImeBloka(BrojBlokova) = blockOBj.Name
Debug.Print " Dodan blok("; BrojBlokova; "):"; blockOBj.Name
End If
Else
GoTo 1
End If
End If
End With
'EntObj.Highlight True
1 Next EntObj


End Sub

Rank: 1

OldForumPost

Newbie

posts: 0

Registered: 2012-1-14

Message 2 of 3

 VBA Entity Crash/table Run-Time Error
27-03-2011 08:07 . pm   |   View his/her posts only
I am sorry to tell you that , this is because ZWCAD VBA interface is not supporting Table object at the time being. We will try to fix it ASAP. Thanks for the feedback.

Rank: 1

Marijan Glavac

Newbie

posts: 0

Registered: 2011-6-5

Message 3 of 3

28-03-2011 06:07 . am   |   View his/her posts only
Thanks on replay.

See also
X