コード例 #1
0
        private ObjectId createOrRetrieveDescriptionKeySet(string name)
        {
            PointDescriptionKeySetCollection keySets =
                PointDescriptionKeySetCollection
                .GetPointDescriptionKeySets(_database);

            if (keySets.Contains(name))
            {
                return(keySets[name]);
            }
            return(keySets.Add(name));
        }
コード例 #2
0
        private ObjectId createOrRetrieveDescriptionKeySetAndForce(string name)
        {
            PointDescriptionKeySetCollection keySets =
                PointDescriptionKeySetCollection
                .GetPointDescriptionKeySets(_database);
            ObjectIdCollection searchOrder = keySets.SearchOrder;

            if (keySets.Contains(name))
            {
                return(keySets[name]);
            }
            ObjectId newKeySetId = keySets.Add(name);

            searchOrder.Insert(0, newKeySetId);
            keySets.SearchOrder = searchOrder;
            return(newKeySetId);
        }