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