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?
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?