Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. Private Sub CommandButton2_Click()
  2. Me.Hide
  3. End Sub
  4. Private Sub CommandButton1_Click()
  5. PKT1 = getPIK(Me.TextBox1.Text)
  6. PKT2 = getPIK(Me.TextBox2.Text)
  7. PKT3 = getPIK(Me.TextBox3.Text)
  8. Dim testDouble As Double = 40.0R
  9. R1 = Me.TextBox5.Text
  10. R2 = Me.TextBox6.Text
  11. R3 = Me.TextBox4.Text
  12. Me.Label5.Caption = Format(PKT1.X, "0.00")
  13. Me.Label15.Caption = Format(PKT1.Y, "0.00")
  14. Me.Label12.Caption = Format(PKT2.X, "0.00")
  15. Me.Label16.Caption = Format(PKT2.Y, "0.00")
  16. Me.Label13.Caption = Format(PKT3.X, "0.00")
  17. Me.Label14.Caption = Format(PKT3.Y, "0.00")
  18. End Sub
  19.  
  20. Sub zmienne()
  21. Dim X1 As Point3d
  22. Dim X2 As Point3d
  23. Dim X3 As Point3d
  24. Dim R1 As Point3d
  25. Dim R2 As Point3d
  26. Dim R3 As Point3d
  27. X1.X = PIK1.X
  28. X1.Y = PIK1.Y
  29. X2.X = PIK2.X
  30. X2.Y = PIK2.Y
  31. X3.X = PIK3.X
  32. X3.Y = PIK3.Y
  33.  
  34. End Sub
  35.  
  36. Sub kolo(X1 As Point3d, R1 As Double)
  37. Dim kolo2 As EllipseElement
  38. Set kolo2 = CreateEllipseElement2(Nothing, X1, R1, R1, Matrix3dIdentity)
  39. kolo2.LineWeight = 3
  40. ActiveModelReference.AddElement kolo2
  41. kolo2.Redraw
  42. End Sub
  43.  
  44.  
  45. Private Sub CommandButton3_Click()
  46. X1.X = PKT1.X
  47. X1.Y = PKT1.Y
  48. kolo X1, testDouble
  49. End Sub
  50.  
  51.  
  52. Function getPIK(NR As String) As Point3d
  53. Dim oElEnum As ElementEnumerator
  54. Dim El As Element
  55. Set oElEnum = ActiveModelReference.GetSelectedElements
  56. oElEnum.Reset
  57. While oElEnum.MoveNext
  58. Set oEl = oElEnum.Current
  59. If oEl.Type = msdElementTypeText Then
  60. If oEl.AsTextElement.Text = NR Then
  61. getPIK = oEl.AsTextElement.Origin
  62. End If
  63. End If
  64. Wend
  65. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement