I want to connect some object (connection: endpoijt is the next beginpoint and elevation the same)
So for these object i created a reactorroutine "acPipeMod"
AddHandler oPipe.Modified, AddressOf acPipeMod
Together with commandended
Dim d As Autodesk.AutoCAD.ApplicationServices.Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument()
AddHandler d.CommandEnded, AddressOf CommandEnded
So when the object are moved they are put in a collection and after the command, the fixing begins.
Public Shared Handler_objIds As ObjectIdCollection = New ObjectIdCollection
Public Sub acPipeMod(ByVal senderObj As Object, _
ByVal evtArgs As EventArgs)
Dim opipe As Pipe = senderObj
Handler_objIds.Add(opipe.ObjectId)
End Sub
But before starting I must stop the reactor, so that I don't have a loop.
oPipe = trans.GetObject(pipeid, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForWrite)
If oPipe.IsWriteEnabled = False Then
oPipe.UpgradeOpen()
End If
RemoveHandler oPipe.Modified, AddressOf acPipeMod
But this part, I can't get wrigth, the reactor stays active.
Is there an other step that I must do, to stop the reactor.