private void StreamExtentSample()
        {
            // intro message
            Editor editor = GetEditor();

            editor.WriteMessage("* StreamExtent *\n");
            editor.WriteMessage("StreamExtent detects the extents of all the objects in the stream.\n");
            editor.WriteMessage("Pick some objects in the current drawing and the extents will be highlighted.\n");

            // pick multiple objects
            ObjectIdCollection ids = PickObjectSet();

            if (ids.Count == 0)
            {
                editor.WriteMessage("No object is picked\n");
                return;
            }

            Database     db     = GetDatabase();
            StreamExtent stream = new StreamExtent(db);

            TransactionManager tm = db.TransactionManager;

            using (Transaction trans = tm.StartTransaction())
            {
                stream.PushDisplayParameters(DictionaryDisplayConfiguration.GetStandardDisplayConfiguration(db), trans);

                foreach (ObjectId id in ids)
                {
                    Entity ent = trans.GetObject(id, OpenMode.ForRead) as Entity;
                    stream.Stream(ent);
                }

                stream.PopDisplayParameters();
                trans.Commit();
            }

            HighlightBoundBox3d(stream.Extents);
        }