public static void RegisterHogForID(int id, TracedHog hog) { if (hogDictionary.ContainsKey(id)) { hogDictionary[id] = hog; } else { hogDictionary.Add(id, hog); } }
public static TracedHog ByPoint(double x, double y) { TracedHog tHog; HogID hid = TraceUtils.GetTraceData(REVIT_TRACE_ID) as HogID; if (hid == null) { // Trace didn't give us a hog, it's a new one. tHog = new TracedHog(x, y); } else { tHog = TracedHogManager.GetHogByID(hid.IntID); } // Set the trace data on the return to be this hog. TraceUtils.SetTraceData(REVIT_TRACE_ID, new HogID { IntID = tHog.ID }); return(tHog); }
public static TracedHog ByPoint(double x, double y) { TracedHog tHog; HogID hid = TraceUtils.GetTraceData(REVIT_TRACE_ID) as HogID; if (hid == null) { // Trace didn't give us a hog, it's a new one. tHog = new TracedHog(x, y); } else { tHog = TracedHogManager.GetHogByID(hid.IntID); } // Set the trace data on the return to be this hog. TraceUtils.SetTraceData(REVIT_TRACE_ID, new HogID { IntID = tHog.ID }); return tHog; }