Class SiteLayout
A site layout
Namespace: Scripting
Syntax
public class SiteLayout
Constructors
SiteLayout()
Creates an instance of the SiteLayout class.
Declaration
public SiteLayout()
Properties
ExclusionRegions
Gets all the exclusion regions in this site layout.
Declaration
public IEnumerable<ExclusionRegion> ExclusionRegions { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ExclusionRegion> |
InverterInstances
Gets all the inverter instances in this site layout.
Declaration
public IEnumerable<InverterInstance> InverterInstances { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<InverterInstance> |
LayoutBoundaries
Gets all the layout boundaries in this site layout.
Declaration
public IEnumerable<LayoutBoundary> LayoutBoundaries { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<LayoutBoundary> |
Name
Name of the site layout
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RackInstanceInfos
Gets the rack instance infos for the SiteLayout.
Declaration
public IEnumerable<RackInstanceInfo> RackInstanceInfos { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<RackInstanceInfo> |
SiteLayoutType
The site layout type
Declaration
public SiteLayoutType SiteLayoutType { get; set; }
Property Value
Type | Description |
---|---|
SiteLayoutType |
Statistics
Declaration
public SiteLayoutStatistics Statistics { get; set; }
Property Value
Type | Description |
---|---|
SiteLayoutStatistics |
TransformerInstances
Gets all the transformer instances in this site layout.
Declaration
public IEnumerable<TransformerInstance> TransformerInstances { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TransformerInstance> |
Methods
AddExclusionRegion(String, IEnumerable<I2DLocation>)
Add an exclusion region to the site layout with the specified name and boundary points.
Declaration
public ExclusionRegion AddExclusionRegion(string name, IEnumerable<I2DLocation> points)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name to give the exclusion region. |
System.Collections.Generic.IEnumerable<I2DLocation> | points | The points that will make up the exclusion region's boundary. |
Returns
Type | Description |
---|---|
ExclusionRegion | The added exclusion region. |
AddLayoutRegion(IEnumerable<I2DLocation>, Boolean, String)
Add a new layout region to the site layout with the specified boundary points. Can be for a fixed-tilt rack or single-axis tracker site layout.
Declaration
public LayoutBoundary AddLayoutRegion(IEnumerable<I2DLocation> points, bool autoFillAutomatically = true, string name = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<I2DLocation> | points | The points that will make up the layout region's boundary. |
System.Boolean | autoFillAutomatically | Sets the 'AutoFill' flag on the new layout region. |
System.String | name | The name to give the layout region if set; if left null will use a default name. |
Returns
Type | Description |
---|---|
LayoutBoundary | The newly created layout region. |
AddTrackerLayoutRegion(IEnumerable<I2DLocation>, Boolean, TrackerPlacementModeType, String)
Add a new tracker layout region to the site layout with the specified boundary points and tracker placement mode type.
Declaration
public LayoutBoundary AddTrackerLayoutRegion(IEnumerable<I2DLocation> points, bool autoFillAutomatically = true, TrackerPlacementModeType trackerPlacementMode = TrackerPlacementModeType.InPlane, string name = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<I2DLocation> | points | The points that will make up the layout region's boundary. |
System.Boolean | autoFillAutomatically | Sets the 'AutoFill' flag on the new layout region. |
TrackerPlacementModeType | trackerPlacementMode | The tracker placement mode. |
System.String | name | The name to give the layout region if set; if left null will use a default name. |
Returns
Type | Description |
---|---|
LayoutBoundary | The newly created layout region. |
AddTransformerInstance(I2DLocation, TransformerSpecification)
Adds a new transformer instance at the specified location, using the specified transformer specification.
Declaration
public void AddTransformerInstance(I2DLocation location, TransformerSpecification transformerSpecification)
Parameters
Type | Name | Description |
---|---|---|
I2DLocation | location | The location (in workbook projection). |
TransformerSpecification | transformerSpecification | The transformer specification to use for the transformer instance. |
Equals(SiteLayout)
Tests a SiteLayout against this current SiteLayout for equality.
Declaration
public bool Equals(SiteLayout val)
Parameters
Type | Name | Description |
---|---|---|
SiteLayout | val |
Returns
Type | Description |
---|---|
System.Boolean | True if equal otherwise false is returned. |
Equals(Object)
Tests a System.Object against this current SiteLayout for equality.
Declaration
public override bool Equals(object toCompare)
Parameters
Type | Name | Description |
---|---|---|
System.Object | toCompare |
Returns
Type | Description |
---|---|
System.Boolean | True if object is equal otherwise false is returned. |
Overrides
GetHashCode()
Gets the hash code for this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this object. |
Overrides
ImportRegionsFromGoogleEarthFile(String, Nullable<TrackerPlacementModeType>)
Imports the regions (layout and exclusion regions) from the specified Google Earth (.KML or .KMZ) file.
Declaration
public bool ImportRegionsFromGoogleEarthFile(string filePath, TrackerPlacementModeType? trackerPlacementMode = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The .KML or .KMZ file path. |
System.Nullable<TrackerPlacementModeType> | trackerPlacementMode | The tracker placement mode to use (if trackers). If null will use the default. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ImportRegionsFromShapefile(String)
Imports the regions (layout and exclusion regions) from the specified shapefile.
Declaration
public void ImportRegionsFromShapefile(string shapefilePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | shapefilePath | The shapefile path. |
RemoveAllEmptyRacksOrTrackers()
Removes all empty racks/trackers in the site layout.
Declaration
public void RemoveAllEmptyRacksOrTrackers()
RemoveAllExclusionRegions()
Removes all the exclusion regions in this site layout.
Declaration
public void RemoveAllExclusionRegions()
RemoveAllInverterInstances()
Removes all inverter instances in this site layout.
Declaration
public void RemoveAllInverterInstances()
RemoveAllLayoutRegions()
Removes all the layout regions in this site layout.
Declaration
public void RemoveAllLayoutRegions()
RemoveAllRacks()
Removes all racks in the site layout.
Declaration
public void RemoveAllRacks()
RemoveAllTransformerInstances()
Removes all transformer instances in this site layout.
Declaration
public void RemoveAllTransformerInstances()
RemoveExclusionRegion(ExclusionRegion)
Removes the specified exclusion region from the site layout.
Declaration
public void RemoveExclusionRegion(ExclusionRegion exclusionRegion)
Parameters
Type | Name | Description |
---|---|---|
ExclusionRegion | exclusionRegion | The exclusion region to remove. |
RemoveLayoutRegion(LayoutBoundary)
Removes the specified layout region from the site layout.
Declaration
public void RemoveLayoutRegion(LayoutBoundary layoutBoundary)
Parameters
Type | Name | Description |
---|---|---|
LayoutBoundary | layoutBoundary | The layout region to remove. |
UpdateCache()
Updates the cache for this SiteLayout.
Declaration
public void UpdateCache()
UpdateFromSpecifySiteDefinition(SpecifySiteDefinition)
Updates the site layout from the given SpecifySiteDefinition.
Declaration
public void UpdateFromSpecifySiteDefinition(SpecifySiteDefinition specifySiteDefinition)
Parameters
Type | Name | Description |
---|---|---|
SpecifySiteDefinition | specifySiteDefinition | The specify site definition to use. |
Operators
Equality(SiteLayout, SiteLayout)
Tests a SiteLayout against this current SiteLayout for equality.
Declaration
public static bool operator ==(SiteLayout a, SiteLayout b)
Parameters
Type | Name | Description |
---|---|---|
SiteLayout | a | |
SiteLayout | b |
Returns
Type | Description |
---|---|
System.Boolean | True if equal otherwise false is returned. |
Inequality(SiteLayout, SiteLayout)
Tests a SiteLayout against this current SiteLayout for inequality.
Declaration
public static bool operator !=(SiteLayout a, SiteLayout b)
Parameters
Type | Name | Description |
---|---|---|
SiteLayout | a | |
SiteLayout | b |
Returns
Type | Description |
---|---|
System.Boolean | True if not equal otherwise false is returned. |