Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

SPAWorkbench???

Status
Not open for further replies.

mouha

Computer
Dec 8, 2003
16
CA
hello
I'm trying to get minimum distance between point and surfance on catia v5 r10, so I have used the function getminimumdistance described on the help on line of catia like this:
This example retrieves the distance 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.GetMinimumDistance(reference2)

but when i execute this macro, an error message appear : object dosnt support this property or method:'TheSPAWorkbench'

so I dont know if there are a mistake on catia help!
is there any one who can help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor