Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public vKula1 As Integer
- Private Sub buttOK_Click()
- Dim miejsce As String
- UserForm1.buttOK.Cancel = True
- Dim str As String
- vKula1 = UserForm1.v1Kula1
- Dim r As Double
- Dim x As Double
- Dim y As Double
- Dim z As Double
- UserForm1.Hide
- Dim Pl1(0 To 2) As Double
- Dim Pl2(0 To 2) As Double
- miejsce = "Wskaż miejsce uderzenia na drugiej kuli"
- MsgBox miejsce
- With ThisDrawing.Utility
- point = .GetPoint
- End With
- Dim LiniaWiodaca1 As AcadLine
- Dim point2(2) As Double
- Pl2(0) = point(0)
- Pl2(1) = point(1)
- Dim ModelSpace As AcadModelSpace
- Set ModelSpace = ActiveDocument.ModelSpace
- For Each obj In ModelSpace
- str = obj.ObjectName
- If "AcDbCircle" = obj.ObjectName Then
- Set cir = obj
- If cir.Layer = "Kula2" Then
- Set LiniaWiodaca1 = ThisDrawing.ModelSpace.AddLine(cir.Center, Pl2)
- x = cir.Center(0) - point(0)
- y = cir.Center(1) - point(1)
- z = cir.Center(2) - point(2)
- r = Sqr((Sqr((x ^ 2) + (y ^ 2)) ^ 2) + (z ^ 2))
- 'Set tempSolid = bryla1.CheckInterference(bryla2, True, bSolidsInterfere)
- End If
- End If
- Next
- For Each obj In ModelSpace
- str = obj.ObjectName
- If "AcDbCircle" = obj.ObjectName Then
- Set cir = obj
- If cir.Layer = "Kula1" Then
- cir.Move cir.Center, point
- cir.Update
- 'Set tempSolid = bryla1.CheckInterference(bryla2, True, bSolidsInterfere)
- End If
- End If
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement