Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • 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
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor