kakotime Function kakotime Dim crv,grp,path,col,l1,l2,F1,F2,t,h,m,s crv=Rhino.GetObjects("パスを選択して下さい",0,True,true,False) If IsNull(crv) Then Exit Function End If grp=Rhino.ObjectTopGroup (crv(0)) If IsNull(grp) Then MsgBox "グループがありません" Exit Function End If 'MsgBox grp F1=Rhino.GetInteger("切削送りを入力して下さい (mm/min)",350,1) F2=Rhino.GetInteger("早送りを入力して下さい (mm/min)",8000,1) path=Rhino.ObjectsByGroup(grp) For Each cv in path If Rhino.IsCurve(cv) Then col=Rhino.ObjectColor(cv) If col=255 Then '赤色の切削送り l1=l1+Rhino.CurveLength(cv) ElseIf col=16711680 Then '青色の早送り l2=l2+Rhino.CurveLength(cv) End If End If Next t=l1/f1+l2/f2 h=Int(t/60) m=t mod 60 s=t*60 mod 60 'MsgBox "加工時間:" & round(l1/f1+l2/f2,3) & "mim" ,,grp MsgBox "加工時間:" &h& "時間" &m& "分" &s& "秒" ,, grp End Function