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!

GetAngleBetween Object doesn't support this property or method 1

Status
Not open for further replies.

josephv

Mechanical
Joined
Oct 1, 2002
Messages
683
Location
CA

Hello,

We are creating a macro to get the angle between 2 lines.
We are using the GetAngleBetween Method, but we get the following error:
Object doesn't support this property or method (Error 438)

We are using the example from the CATIA help below.

Please let us know if you have run into this and know of a fix.

Thanks,

Joseph






This example retrieves the angle between the reference1 and reference2.
Dim reference1 As Reference
Set reference1 = part1.CreateReferenceFromObject(object1) Dim reference2 As Reference
Set reference2 = part1.CreateReferenceFromObject(object1) Dim TheSPAWorkbench As Workbench
Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" )
Dim TheMeasurable As Measurable
Set TheMeasurable = TheSPAWorkbench.Measurable(reference1) Dim MinimumDistance As double
MinimumDistance = TheMeasurable.GetAngleBetween(reference2)
 

Hello,

Figured out the problem, the documentation is not correct the following line:

Set TheMeasurable = TheSPAWorkbench.Measurable(reference1)

Should read "GetMeasurable" not "Measurable"

Thank you,

Joseph
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top