• User Guide
  • Calculation
  • Automation
  • Web API
  • Validation
  • Contact Us
Search Results for

    Show / Hide Table of Contents
    • Introduction
    • –––––––––––––––––––
    • Snippets - General
      • Write to Log
    • Snippets - Set up workbook
      • Site
      • Climate
      • Shading objects
      • Components
      • Layout
      • Energy
      • Report
    • Snippets - Calculation
      • Run Energy Calculation
      • Analyse Results
    • Snippets - Layout
      • Set the pitch value
      • Vary pitch by slope
      • Define inverter blocks
      • Specify site
      • Set the tracker system
      • Import regions from files
    • Snippets - Maps
      • Elevation Profile Tool
      • Projections
    • Snippets - Optimisation
      • Optimisation
    • Snippets - Trackers
      • Importing tracker positions
      • Using custom tracker rotations
    • –––––––––––––––––––
    • Class References
      • Scripting
        • AcWiring
        • AddableCollection<T>
        • AddCentralInverterAndAssignStringsParameters
        • Angle
        • AngularModelEnum
        • AnnualEnergyYieldResults
        • AreaLimitation
        • AreaLimitationType
        • Azimuth
        • AzimuthVsAltitude
        • BackgroundImage
        • CalculationSettings
        • CellTempModelParameters
        • CentralInverterLocationParameters
        • CircumsolarType
        • Climate
        • ComponentLibrary
        • ComponentStatistic
        • CustomDateTimeTrackerPositionAlgorithmBase
        • DiffuseMultipliers
        • DiffuseShadingScheme
        • DiffuseTranspositionModel
        • DigitalTerrainResultsSummary
        • DiodeModel
        • DisabledModels
        • DistanceType
        • DistributionType
        • Domain
        • Efficiency
        • EfficiencyBase
        • EfficiencyCurve
        • EfficiencyCurveType
        • ElectricalLimitation
        • ElectricalLimitationType
        • ElectricalPower
        • Elevation
        • ElevationContours
        • ElevationGrid
        • ElevationProfileSamplePoint
        • ElevationProfileStatistics
        • EnergyYieldCalculationScenario
        • EnergyYieldCalculationType
        • EnergyYieldEffects
        • EnumTechnology
        • ExceedanceLevel
        • ExclusionRegion
        • Export
        • FillOptionComponentOptions
        • FillOptionIndividualComponentsOptions
        • FillOptionInverterBlockOptions
        • FillOptionRackLayoutOptions
        • FillOptionsSpacingType
        • FillOptionsType
        • FillOptionTrackerLayoutOptions
        • FillOptionUseExistingLayoutOptions
        • FlatTerrainParameters
        • GenericLayout
        • GenericLayoutFillOption
        • GenericLayoutSettings
        • Geography
        • HorizonData
        • I2DLocation
        • I3DLocation
        • IAddableEnumerable<T>
        • IAddableKeyedEnumerable<TKey, TValue>
        • IClearableCollection<T>
        • IEditableKeyedCollection<tKeyType, tContainedType>
        • IEditableKeyedEnumerable<TKeyType, TContainedType>
        • IElevationSource
        • Import
        • INamedItem
        • InstantaneousCondition
        • InverterBlockSpecification
        • InverterEfficiencyType
        • InverterInputInstance
        • InverterInputSpecification
        • InverterInstance
        • InverterSpecification
        • InverterSpecificationDocumentType
        • InverterTemperatureCurveEntry
        • InverterType
        • IReadable2DLocation
        • IReadable3DLocation
        • IReadableKeyedCollection<tKeyType, tContainedType>
        • IReadableKeyedEnumerable<TKey, TValue>
        • IRemovableKeyedEnumerable<TKey, TValue>
        • IResolution
        • Irradiance
        • ISpeed
        • IvCurve
        • KeyedCollection<TKeyType, TContainedType>
        • LayoutBoundary
        • LayoutBoundaryMarginParameter
        • LayoutBoundaryMarginParameters
        • LayoutChoiceType
        • LayoutParamsPitchModel
        • LayoutStatistic
        • Location
        • Location3D
        • LogLevel
        • MarginType
        • ModuleCellLayoutType
        • ModuleOrientation
        • ModuleSpecification
        • ModuleSpecificationDocumentType
        • MonteCarloSettings
        • MonthlyAlbedo
        • MonthlyEnergyYieldEffects
        • MonthlyEnergyYieldResults
        • MonthlySoilingValue
        • PerformanceStatistics
        • Projection
        • ProjectionInformation
        • PvsystCellTempModelParameters
        • PvsystInputIrradianceType
        • PVsystModelParameters
        • Quad
        • RackInstanceInfo
        • RackLayoutDefinition
        • RackLayoutParameters
        • RackSpecification
        • RackSystemSpecification
        • ReadOnly3DLocation
        • ReadOnlyLocation
        • Rectangle
        • Region
        • ReportCategory
        • Reporting
        • Resolution
        • RoadLocationParameters
        • RoughnessContours
        • RowPositionParameters
        • ScenarioAlbedoData
        • ScenarioMonthlyAlbedo
        • ScriptingException
        • ShadingTargetPointPattern
        • SiteLayout
        • SiteLayoutStatistics
        • SiteLayoutType
        • SiteReferencePoint
        • SoilingEffectData
        • SolarResource
        • SpacingZone
        • SpecifySiteConfiguration
        • SpecifySiteDefinition
        • SpecifySiteLayoutRegionFillChoice
        • Speed
        • StringPatternType
        • SubArray
        • SunGeography
        • SunPosition
        • SunriseSunset
        • Temperature
        • TimeStepCalculation
        • Toolbox
        • TrackerGroup
        • TrackerImport
        • TrackerInfo
        • TrackerLayoutDefinition
        • TrackerLayoutParameters
        • TrackerPlacementModeType
        • TrackerPositionAlgorithmBase
        • TrackerRotations
        • TrackerRotationsTimeStep
        • TrackerSystemSpecification
        • TrackerTemplateSpecification
        • TransformerInstance
        • TransformerModelType
        • TransformerSpecification
        • TransformerSpecificationDocumentType
        • TwoDiodeParameters
        • Uncertainty
        • UncertaintyAnnualVariabilities
        • Workbook
        • WorkbookSettings
        • WorkbookSpecificModuleSpecification
        • YearRange
        • YieldResult
        • YieldResults

    Set the pitch value

    If your site contains a large number of layout regions and you want to set the same pitch value for them all it can become very tedious to do this in the user interface.

    A much quicker way is to use scripting to achieve this.

    The following script sets the pitch value of each layout region to 12 metres (modify the value to the pitch value you wish!):

    public void Execute()
    {
        // Get the currently visible site layout
        SiteLayout siteLayout = Workbook.Domain.VisibleSiteLayout;
    
        // Loop through each layout region in the site layout
        foreach (LayoutBoundary layoutRegion in siteLayout.LayoutBoundaries)
        {
            // Set the pitch of the first spacing zone
            layoutRegion.TrackerLayoutParameters
                        .RowPositionParameters
                        .SpacingZoneFromTop
                        .Pitch = 12;
    
            // Toggle the AutoFillAutomatically property. This will force it to re-lay out
            // the rows using the new pitch value.
            layoutRegion.AutoFillAutomatically = false;
            layoutRegion.AutoFillAutomatically = true;
    
            // Refresh the display
            layoutRegion.RefreshDisplay();
        }
        // Update the site layout cache
        siteLayout.UpdateCache();
    }
    
    Note

    This only sets the first pitch value for each layout region. There can be more than one pitch value if you have used the 'Edit Lines' tool to set multiple anchor rows.

    In This Article
    Back to top DNV SolarFarmer Home