thealeks
Computer
- Aug 27, 2003
- 1
I have wrote VBA project for automating some autocad tasks. But VBA
project's behavior differ from time to time i run it.
There the code:
Dim CurrentLinks As CAO.Links
Dim ObjectIDs(0 To 0) As Long
ObjectIDs(0) = CurrentCircle.ObjectID
Set CurrentLinks = dbConnect.GetLinks(CurrentLinkTemplate, ObjectIDs, CAO.kEntityLinkType)
Dim msgString As String
If CurrentLinks Is Nothing Then
Call PanToObject(CurrentCircle, c_Magnfication_Error)
Initialize = False
Exit Function
End If
If CurrentLinks.Count <> 1 Then
Call PanToObject(CurrentCircle, c_Magnfication_Error)
Initialize = False
Exit Function
End If
Each linked autocad entity have only 1 link. But some times i run
script it finds more than 1 links for some objects. But when i choose (dbConnect->Links->Links Manager)
for such object i can see only 1 link.
Is this is a bug in CAO library or my mistake?
project's behavior differ from time to time i run it.
There the code:
Dim CurrentLinks As CAO.Links
Dim ObjectIDs(0 To 0) As Long
ObjectIDs(0) = CurrentCircle.ObjectID
Set CurrentLinks = dbConnect.GetLinks(CurrentLinkTemplate, ObjectIDs, CAO.kEntityLinkType)
Dim msgString As String
If CurrentLinks Is Nothing Then
Call PanToObject(CurrentCircle, c_Magnfication_Error)
Initialize = False
Exit Function
End If
If CurrentLinks.Count <> 1 Then
Call PanToObject(CurrentCircle, c_Magnfication_Error)
Initialize = False
Exit Function
End If
Each linked autocad entity have only 1 link. But some times i run
script it finds more than 1 links for some objects. But when i choose (dbConnect->Links->Links Manager)
for such object i can see only 1 link.
Is this is a bug in CAO library or my mistake?