theing
New member
- Mar 5, 2014
- 18
hi everybody, i am new in this, and i am learning,
i need to get the angles of a surface, i have the following code
Sub catmain()
Set objsel = CATIA.ActiveDocument.Selection
objsel.Clear
objsel.Search "Type=Topology.Face,all"
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set Selection = partDocument1.Selection
Set ref1 = Selection.Item(1).Reference
Set spabench = partDocument1.GetWorkbench("SPAWorkbench")
Set mymeas = spabench.GetMeasurable(ref1)
On Error Resume Next
Angle = mymeas.Angle
MsgBox Angulo
End Sub
the msgbox is empty, and i dont know what am i doing wrong,
i hope anyone can help me out with this,
Thank you for taking the time reading this.
i need to get the angles of a surface, i have the following code
Sub catmain()
Set objsel = CATIA.ActiveDocument.Selection
objsel.Clear
objsel.Search "Type=Topology.Face,all"
Set partDocument1 = CATIA.ActiveDocument
Set part1 = partDocument1.Part
Set Selection = partDocument1.Selection
Set ref1 = Selection.Item(1).Reference
Set spabench = partDocument1.GetWorkbench("SPAWorkbench")
Set mymeas = spabench.GetMeasurable(ref1)
On Error Resume Next
Angle = mymeas.Angle
MsgBox Angulo
End Sub
the msgbox is empty, and i dont know what am i doing wrong,
i hope anyone can help me out with this,
Thank you for taking the time reading this.