public void RemoveTransientSelection() { // Removal is performed by setting to null Transient.CapturedDrawable = null; // Erase the transient graphics and dispose of the transient if (_st != null) { TransientManager.CurrentTransientManager.EraseTransient( _st, new IntegerCollection() ); _st.Dispose(); _st = null; } // And dispose of our line if (_ln != null) { _ln.Dispose(); _ln = null; } }
public void TransientSelection() { // Create a line and pass it to the SelectableTransient // This makes cleaning up much more straightforward _ln = new Line(Point3d.Origin, new Point3d(10, 10, 0)); _st = new SelectableTransient(_ln); // Tell AutoCAD to call into this transient's extended // protocol when appropriate Transient.CapturedDrawable = _st; // Go ahead and draw the transient TransientManager.CurrentTransientManager.AddTransient( _st, TransientDrawingMode.DirectShortTerm, 128, new IntegerCollection() ); }