Private Sub CommandButton1_Click()Private Function AddLWPlineArc(ByVal ptCen As Variant, ByVal radius As Double, ByVal angleSt As Double, ByVal angleEn As Double, ByVal width As Double) As AcadLWPolylineDim objPline As AcadLWPolylineDim ptCen(0 To 1) As VariantDim radius As DoubleDim angleSt As DoubleDim angleEn As DoubleDim width As DoubleptCen(0) = Val(TextBox8.Text)ptCen(1) = Val(TextBox7.Text)radius = Val(TextBox3.Text)angleSt = Val(TextBox4.Text)angleEn = Val(TextBox5.Text)wdth = Val(TextBox6.Text)Dim ptArr(0 To 3) As DoubleptArr(0) = ptCen(0) + radius * Cos(angleSt)ptArr(1) = ptCen(1) + radius * Sin(angleSt)ptArr(2) = ptCen(0) + radius * Cos(angleEn)ptArr(3) = ptCen(1) + radius * Sin(angleEn)Set objPline = ThisDrawing.ModelSpace.AddLightWeightPolyline(ptArr)objPline.ConstantWidth = widthIf angleEn < angleSt ThenangleSt = angleSt - 8 * Ant(1)End IfobjPline.SetBulge 0, Tan((angleEn - angleSt) / 4)objPline.SetBulge 1, 0objPline.UpdateSet AddLWPlineArc = objPlineEnd Function
- 2 回答
- 0 关注
- 104 浏览
添加回答
举报
0/150
提交
取消