コード例 #1
0
 public static bool ToLinearDimension_Secondary(object data, ref LinearDimension rc)
 {
     if (data != null)
     {
         Guid gUID = data.GetType().GUID;
         Guid guid3 = gUID;
         if ((guid3 == GH_TypeLib.id_guid) || (guid3 == GH_TypeLib.id_gh_guid))
         {
             Guid guid2;
             if (gUID == GH_TypeLib.id_guid)
             {
                 guid2 = (Guid)data;
             }
             else
             {
                 guid2 = ((GH_Guid)data).Value;
             }
             Rhino.DocObjects.ObjRef refer = new ObjRef((Guid)guid2);
             LinearDimension dimension = (LinearDimension)refer.Geometry();
             if (dimension != null)
             {
                 rc = (LinearDimension)dimension.Duplicate();
                 return true;
             }
         }
         return false;
     }
     return false;
 }