Hi guys, I'm fairly new at CATIA automation programming and I am
having a bit of an issue here.
I'm trying to establish a link between annotations (FTA) and the geometry on which the annotation is attached. I found an an example in the documentation (title: Retrieving the Geometry Pointed to by an Annotation")
Unfortunately, I get a compile error when trying to run the following code:
Set annotation = annotations.Item(IdxAnnot)
SurfCount = annotation.GetSurfacesCount()
Dim enumValues () as Variant
ReDim enumValues (SurfCount - 1)
annotation.GetSurfaces(enumValues)
Dim Name As String
For i = LBound(enumValues) to UBound(enumValues)
Name = enumValues(i)
msgBox Name
Next
The problem is the 'annotation.GetSurfaces(enumValues)'
Here is the error message I get (translated from french):
Function or interface referenced with restrictions or function using an Automation type not handled by Visual Basic.
The documentation doesn't say that the this function is deprecated or anything. Any help is welcome.
Thanks,
Dom
I'm trying to establish a link between annotations (FTA) and the geometry on which the annotation is attached. I found an an example in the documentation (title: Retrieving the Geometry Pointed to by an Annotation")
Unfortunately, I get a compile error when trying to run the following code:
Set annotation = annotations.Item(IdxAnnot)
SurfCount = annotation.GetSurfacesCount()
Dim enumValues () as Variant
ReDim enumValues (SurfCount - 1)
annotation.GetSurfaces(enumValues)
Dim Name As String
For i = LBound(enumValues) to UBound(enumValues)
Name = enumValues(i)
msgBox Name
Next
The problem is the 'annotation.GetSurfaces(enumValues)'
Here is the error message I get (translated from french):
Function or interface referenced with restrictions or function using an Automation type not handled by Visual Basic.
The documentation doesn't say that the this function is deprecated or anything. Any help is welcome.
Thanks,
Dom
