public static dynamic GetTSObject(CoordinateSystemType dynEnum) { var tsType = TSActivator.CreateInstance("Tekla.Structures.Model.BasePoint.CoordinateSystemType").GetType(); switch (dynEnum) { case CoordinateSystemType.GLOBAL: return(System.Enum.Parse(tsType, "GLOBAL")); case CoordinateSystemType.WORKPLANE: return(System.Enum.Parse(tsType, "WORKPLANE")); default: throw new DynamicAPIException(dynEnum.ToString() + "- enum value is not implemented"); } }