Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoCAD CAO and VBA problem

Status
Not open for further replies.

thealeks

Computer
Joined
Aug 27, 2003
Messages
1
Location
RU
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top