ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Core Namespace / StartProjectMode Enumeration
Example Example

In This Topic
    StartProjectMode Enumeration
    In This Topic
    Specifies the start mode for the ArcGIS Pro application
    Syntax
    Members
    MemberDescription
    ShowStartPage Show the start page (this is the default)
    WithDefaultProjectOpen the default project specified in GeneralOptions.StartupProjectPath
    WithoutProjectTempate Bypass the start page and begin working without a template
    Example
    Set GeneralOptions to Use Defaults
    //Default options can be set regardless of the value of the "companion"
    //path (to a project, folder, gdb, toolbox, etc.). The path value is ignored if
    //the option setting does not use it. This is the same behavior as on the Pro UI.
    ApplicationOptions.GeneralOptions.StartupOption = StartProjectMode.ShowStartPage;
    ApplicationOptions.GeneralOptions.HomeFolderOption = OptionSetting.UseDefault;
    ApplicationOptions.GeneralOptions.DefaultGeodatabaseOption = OptionSetting.UseDefault;
    ApplicationOptions.GeneralOptions.DefaultToolboxOption = OptionSetting.UseDefault;//set default option first
    
    //path values can (optionally) be set (back) to null if their 
    //"companion" option setting is the default option.
    if (ApplicationOptions.GeneralOptions.StartupOption != StartProjectMode.WithDefaultProject)
      ApplicationOptions.GeneralOptions.StartupProjectPath = null;
    if (ApplicationOptions.GeneralOptions.HomeFolderOption == OptionSetting.UseDefault)
      ApplicationOptions.GeneralOptions.CustomHomeFolder = null;
    if (ApplicationOptions.GeneralOptions.DefaultGeodatabaseOption == OptionSetting.UseDefault)
      ApplicationOptions.GeneralOptions.CustomDefaultGeodatabase = null;
    if (ApplicationOptions.GeneralOptions.DefaultToolboxOption == OptionSetting.UseDefault)
      ApplicationOptions.GeneralOptions.CustomDefaultToolbox = null;
    
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Desktop.Core.StartProjectMode

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also