Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ISubtypes subtypes = (ISubtypes) targetFC; // Get subtypes from the target feature class
- IFeature newFeature = targetFC.CreateFeature();
- if (subtypes.HasSubtype)
- {
- // Assign defaults for the subtype
- IRowSubtypes rowSubtypes = (IRowSubtypes)newFeature;
- rowSubtypes.SubtypeCode = subtypes.DefaultSubtypeCode;
- rowSubtypes.InitDefaultValues();
- newFeature.Store();
- }
- else
- {
- // Assign defaults for the feature
- IRowSubtypes rowSubtypes = (IRowSubtypes)newFeature;
- rowSubtypes.InitDefaultValues();
- newFeature.Store();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement