IWorkspaceFactory2 WrkSpcFact = new SdeWorkspaceFactoryClass(); IWorkspace WrkSpc; WrkSpc = WrkSpcFact.OpenFromFile("\\MyConnection.sde", 0); IVersionedWorkspace3 VrsWrkSpc; VrsWrkSpc = WrkSpc as IVersionedWorkspace3; //get version for current system user IEnumVersionInfo VerEnum = VrsWrkSpc.Versions; IVersionInfo VersInfo = VerEnum.Next(); string UserID = Environment.UserName.ToUpper(); string VersionName; string TargetVersionName = ""; IVersion TargetVersion = null; while (VersInfo != null) { VersionName = VersInfo.VersionName; VersionName = VersionName.ToUpper(); if (VersionName.Contains(UserID)) { TargetVersionName = VersInfo.VersionName; TargetVersion = VrsWrkSpc.FindVersion(VersInfo.VersionName); } VersInfo = VerEnum.Next(); } //create workspace from version IFeatureWorkspace FeatWrkSpc; FeatWrkSpc = (IFeatureWorkspace)TargetVersion; IFeatureClass SitePlanFeatClass = FeatWrkSpc.OpenFeatureClass("BASE_ADMIN.site_plan"); //start SDE versioned editing session IWorkspaceEdit VrsWrkSpcEdit = (IWorkspaceEdit)FeatWrkSpc; IMultiuserWorkspaceEdit MUVrsWrkSpcEdit = (IMultiuserWorkspaceEdit)VrsWrkSpcEdit; MUVrsWrkSpcEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned); VrsWrkSpcEdit.StartEditOperation(); IFeature NewSitePlanFeature = SitePlanFeatClass.CreateFeature(); NewSitePlanFeature.Shape = NewPolygonFeat.ShapeCopy; //populate some fields, etc //save NewSitePlanFeature.Store(); VrsWrkSpcEdit.StopEditOperation(); VrsWrkSpcEdit.StopEditing(true);