コード例 #1
0
 public static void RegisterHogForID(int id, TracedHog hog)
 {
     if (hogDictionary.ContainsKey(id))
     {
         hogDictionary[id] = hog;
     }
     else
     {
         hogDictionary.Add(id, hog);
     }
 }
コード例 #2
0
ファイル: TracedHog.cs プロジェクト: manuKrakow/DynamoSamples
 public static void RegisterHogForID(int id, TracedHog hog)
 {
     if (hogDictionary.ContainsKey(id))
     {
         hogDictionary[id] = hog;
     }
     else
     {
         hogDictionary.Add(id, hog);
     }
         
 }
コード例 #3
0
    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);
    }
コード例 #4
0
ファイル: TracedHog.cs プロジェクト: manuKrakow/DynamoSamples
    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;
    }