Arun_Gopala
New member
I am having a part with several shaft features,I am trying to select the shaft angle and chage its angle and loop through all the shaft features in the part.In doing so I am getting an error in "object doesn't support this property or method (objSel.Item(i).FirstAngle) see below teh code.Thanks for your help
Sub CATMain()
Dim objSel As Selection
Set objSel =CATIA.ActiveDocument.Selection
objSel.Search("type=Shaft*,all")
objcount = objSel.count
msgbox objcount
Dim i As Integer
For i = 1 to objSel.Count
dim angle1 as length
set angle1 = objSel.Item(i).FirstAngle
angle1.value=114.0000
Next
End Sub
Sub CATMain()
Dim objSel As Selection
Set objSel =CATIA.ActiveDocument.Selection
objSel.Search("type=Shaft*,all")
objcount = objSel.count
msgbox objcount
Dim i As Integer
For i = 1 to objSel.Count
dim angle1 as length
set angle1 = objSel.Item(i).FirstAngle
angle1.value=114.0000
Next
End Sub