Ejemplo n.º 1
0
        /// <summary>
        /// Returns a SolidEdgeFramework.Environment by category id..
        /// </summary>
        public static SolidEdgeFramework.Environment LookupByCategoryId(this SolidEdgeFramework.Environments environments, Guid categoryId)
        {
            for (int i = 1; i <= environments.Count; i++)
            {
                var environment = environments.Item(i);
                if (environment.GetCategoryId().Equals(categoryId))
                {
                    return(environment);
                }
            }

            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a SolidEdgeFramework.Environment by name.
        /// </summary>
        public static SolidEdgeFramework.Environment LookupByName(this SolidEdgeFramework.Environments environments, string name)
        {
            for (int i = 1; i <= environments.Count; i++)
            {
                var environment = environments.Item(i);
                if (environment.Name.Equals(name))
                {
                    return(environment);
                }
            }

            return(null);
        }
 /// <summary>
 /// Returns the environment that belongs to the current active window of the document.
 /// </summary>
 public static SolidEdgeFramework.Environment GetActiveEnvironment(this SolidEdgeFramework.Application application)
 {
     SolidEdgeFramework.Environments environments = application.Environments;
     return(environments.Item(application.ActiveEnvironment));
 }