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!

Area Part

Status
Not open for further replies.

gerlado

Mechanical
Joined
Oct 17, 2012
Messages
23
Location
ES
Hello friends

I have a problem with a script. I'm working on compute the area of a Part. I thought that this parameter could be exported directly to the Measurable command like this Script.

This Script Show the Area of a Part, but all Area.

Sub CATMain()

Set objPart = CATIA.ActiveDocument.Part
Set objRef = objPart.CreateReferenceFromObject(objPart.MainBody)
Set objSPAWkb = CATIA.ActiveDocument.GetWorkBench("SPAWorkbench")
Set objMeasurable = objSPAWkb.GetMeasurable(objRef)
MsgBox objMeasurable.Area

End Sub

I would like that if I select any Pocket or Hole, the Script can show me this Area in Particular (The Area of this Hole or This Pocket for example).

Could anyone help?

thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top