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 MintJulep 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
Joined
Dec 8, 2003
Messages
16
Location
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

Back
Top