MSESectionProfile#

MSE/SRW section profile library entry.

For batter vs setback distance: calling setUniformAngleBatter without switching mode can appear to succeed while geometry stays in distance mode. Use setUseLayerSetbackDistance(False) first, or setBatterAngleMode(...).

Proxy object representing an MSE / SRW section profile in RSWall.

class rswall.MSESectionProfile.MSESectionProfile#

Bases: _ProxyObject

Represents an MSE section profile in an RSWall SRW project.

Wraps an MSESectionProfileData entry in the project property library.

property name: str#

Get the cached profile name.

getProfileDetails()#

Read the full section profile state in one call.

Return type:

Dict[str, Any]

Returns:

Dict with courses, setback, batter, and uniform-mode fields.

getColour()#

Return profile colour as (red, green, blue, alpha) 0-255.

Return type:

Tuple[int, int, int, int]

setColour(red, green, blue, alpha=255)#

Set profile colour using RGBA components (0-255).

Return type:

None

Parameters:
getColor()#

Alias for getColour().

Return type:

Tuple[int, int, int, int]

setColor(red, green, blue, alpha=255)#

Alias for setColour().

Return type:

None

Parameters:
getNumCourses()#

Number of wall courses in this profile.

Return type:

int

setNumCourses(numCourses)#

Set the number of wall courses (1–1000, matches UI MaxValue).

Return type:

None

Parameters:

numCourses (int)

getUseUniformWallUnitData()#

True when all courses share the uniform wall unit.

Return type:

bool

setUseUniformWallUnitData(useUniformWallUnitData)#

Toggle uniform vs per-course wall unit assignment.

NCMA projects always use uniform wall-unit data. Passing False raises FailedPrecondition (the UI also forces uniform assignment for NCMA).

Return type:

None

Parameters:

useUniformWallUnitData (bool)

getUniformWallUnitName()#

Name of the wall unit applied uniformly to all courses.

Return type:

str

setUniformWallUnitName(uniformWallUnitName)#

Set the uniform wall unit by library name.

Also enables useUniformWallUnitData and applies the unit to every course. Per-course units need setUseUniformWallUnitData(False) first, which NCMA projects reject.

Return type:

None

Parameters:

uniformWallUnitName (str)

getUseUniformSetback()#

True when all courses share the uniform setback distance.

Return type:

bool

setUseUniformSetback(useUniformSetback)#

Toggle uniform vs per-course setback assignment.

Return type:

None

Parameters:

useUniformSetback (bool)

getUseLayerSetbackDistance()#

Return whether setback-distance mode is active (True) vs batter-angle mode (False).

This flag is the exclusive toggle between the two course-setback modes:

  • True — Distance mode: each course is offset by a horizontal distance (uniformLayerSetbackDistance).

  • False — Batter Angle mode: face angle drives the setback geometry (uniformAngleBatter).

Default is True (distance mode). Setting the batter angle without first switching this flag to False stores the angle value but has no effect on the rendered geometry.

Return type:

bool

setUseLayerSetbackDistance(useLayerSetbackDistance)#

Select the setback mode: distance (True) or batter-angle (False).

This is the radio-button selector in the RSWall UI (“Distance” vs “Batter Angle”).

Parameters:

useLayerSetbackDistance (bool) – True activates distance mode (uniformLayerSetbackDistance governs geometry). False activates batter-angle mode (uniformAngleBatter governs geometry).

Return type:

None

Warning

The default is True (distance). Calling setUniformAngleBatter without first calling setUseLayerSetbackDistance(False) will silently store the angle but continue rendering in distance mode. Always call this before setting the angle, or use setBatterAngleMode() which performs both steps.

getUniformLayerSetbackDistance()#

Uniform horizontal setback in project native very-small-length units.

Return type:

float

setUniformLayerSetbackDistance(uniformLayerSetbackDistance)#

Set uniform horizontal setback (non-negative; project very-small-length units).

Also enables useUniformSetback and applies the distance to every course.

Return type:

None

Parameters:

uniformLayerSetbackDistance (float)

getUniformAngleBatter()#

Uniform batter angle in degrees.

Return type:

float

setUniformAngleBatter(uniformAngleBatter)#

Store the batter angle in degrees (UI range [0, 30]).

WARNING: This stores the angle value but does NOT switch the profile to batter-angle mode and does not change geometry until setUseLayerSetbackDistance(False). The profile defaults to distance mode (useLayerSetbackDistance=True). If you only call this method the angle is stored but the wall geometry continues to be governed by the setback distance, making this call effectively a no-op for rendering.

To switch to batter-angle mode AND set the angle, use setBatterAngleMode(degrees) instead. Alternatively, call setUseLayerSetbackDistance(False) first, then this method.

Parameters:

uniformAngleBatter (float) – Batter angle in degrees (positive = top leans back into the wall). Must be in [0, 30].

Return type:

None

setBatterAngleMode(uniformAngleBatter)#

Switch to batter-angle mode and set the angle.

Equivalent to the RSWall UI “Batter Angle” radio-button selection followed by entering the angle. This is the recommended method when you want to set a batter angle from scripting, as it guarantees the mode flag is also updated.

Uses existing setUseLayerSetbackDistance(False) + setUniformAngleBatter; there is no separate RPC endpoint.

Return type:

None

Parameters:

uniformAngleBatter (float)

getBottomLayerElevation()#

Bottom course elevation in project native length units.

Return type:

float

setBottomLayerElevation(bottomLayerElevation)#

Set bottom course elevation in project native length units.

Return type:

None

Parameters:

bottomLayerElevation (float)

setCourseWallUnitName(courseNumber, wallUnitName)#

Assign a wall unit to a single course (requires non-uniform mode).

Return type:

None

Parameters:
  • courseNumber (int)

  • wallUnitName (str)

setCourseSetbackDistance(courseNumber, setbackDistance)#

Set setback for a single course (non-negative; requires non-uniform setback mode).

Return type:

None

Parameters:
  • courseNumber (int)

  • setbackDistance (float)

setName(name)#

Set the profile display name (non-empty).

Return type:

None

Parameters:

name (str)