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!

Area Part

Status
Not open for further replies.

gerlado

Mechanical
Oct 17, 2012
23
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
 
Replies continue below

Recommended for you

Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top