 - Sub changeRad(IDs() As ObjectId, rad As Double)
- If rad <= 0 Then
- Exit Sub
- End If
- Using Trans As Transaction = HostApplicationServices.WorkingDatabase.TransactionManager.StartTransaction
- Dim ent As DBObject = Nothing, cir As Circle = Nothing
- For Each ID As Object In IDs
- ent = Trans.GetObject(ID, OpenMode.ForWrite)
- If TypeOf ent Is Circle Then
- cir = ent
- cir.Radius = rad
- End If
- Next
- Trans.Commit()
- End Using
- End Sub
|