/*---------------------------------------------------------------------------------**//** * Temporarly show how the element will look like. * @bsimethod Bentley Systems * /*--------------+---------------+---------------+---------------+---------------+------*/ protected override void OnDynamicFrame(DgnButtonEvent ev) { Element element = GroupedHoleHelper.CreateElement(m_points[0], ev.Point); if (null == element) { return; } RedrawElems redrawElems = new RedrawElems(); redrawElems.SetDynamicsViewsFromActiveViewSet(Session.GetActiveViewport()); redrawElems.DrawMode = DgnDrawMode.TempDraw; redrawElems.DrawPurpose = DrawPurpose.Dynamics; redrawElems.DoRedraw(element); }
/*---------------------------------------------------------------------------------**//** * Get start and opposite points from data buttons in this method. * /// Start dynamics on first data point. * /// Place the grouped hole on second data point. * @bsimethod Bentley Systems * /*--------------+---------------+---------------+---------------+---------------+------*/ protected override bool OnDataButton(DgnButtonEvent ev) { if (0 == m_points.Count) { BeginDynamics(); } m_points.Add(ev.Point); // Save current data point location. if (m_points.Count < 2) { return(false); } Element element = GroupedHoleHelper.CreateElement(m_points[0], m_points[1]); if (null != element) { element.AddToModel(); // Add new element to active model. } base.OnReinitialize(); return(true); }