rsseismic.Model module#

class rsseismic.Model.RunComputeResult(success: bool, partialSuccess: bool, errorMessage: str)#

Bases: object

Outcome of Model.runCompute().

success: bool#
partialSuccess: bool#
errorMessage: str#
property ok: bool#

True when every selected profile and motion pair completed successfully.

class rsseismic.Model.GenerateProfilesResult(success: bool, errorMessage: str, validationErrors: list[str], profileCount: int, profileNames: list[str], hasBeenGenerated: bool)#

Bases: object

Outcome of Model.generateProfiles().

success: bool#
errorMessage: str#
validationErrors: list[str]#
profileCount: int#
profileNames: list[str]#
hasBeenGenerated: bool#
property ok: bool#

True when profile generation completed successfully.

class rsseismic.Model.ResetGeneratedProfilesResult(success: bool, errorMessage: str, hasBeenGenerated: bool)#

Bases: object

Outcome of Model.resetGeneratedProfiles().

success: bool#
errorMessage: str#
hasBeenGenerated: bool#
class rsseismic.Model.Model(client: Client, modelId: str)#

Bases: _ProxyObject

Handle for an open RSSeismic project.

Obtain a Model from RSSeismicApplication.openFile(path) or RSSeismicApplication.newProject().

Use the attributes on this object to work with project data: Profiles, Motions, Results, MeanProfile, ProjectSettings, ProfileGenerationSettings, and SoilLayers.

property modelId: str#
save() None#

Save the project to its current file path.

saveAs(filePath: str) None#

Save the project to a new file path.

close(saveProject: bool = False) None#

Close the project in RSSeismic.

When saveProject is True, the project is saved before it is closed.

runCompute(timeout: float | None = None) RunComputeResult#

Run analysis for all selected profile and motion combinations.

Returns a RunComputeResult. Check result.ok for full success. When partialSuccess is True, some pairs completed but others failed; see errorMessage for details.

Optional timeout is the maximum wait time in seconds for long runs. When omitted, the call waits until compute finishes.

clearResults() None#

Remove stored analysis results from the project.

resetGeneratedProfiles() ResetGeneratedProfilesResult#

Clear the generated-profiles state so profiles can be generated again.

Does not remove profiles already in the project. Requires automatic profile generation to be enabled in project settings.

generateProfiles(seed: int = 0, timeout: float | None = None) GenerateProfilesResult#

Create individual profiles from the mean profile template.

Validates model.MeanProfile first, then replaces the profiles in the project with the newly generated set. Configure how many profiles to create with model.ProfileGenerationSettings before calling this method.

When seed is 0, RSSeismic chooses a random seed. Use a fixed seed to reproduce the same generated profiles.

Optional timeout is the maximum wait time in seconds. When omitted, the call waits until generation finishes.

Raises:

ScriptingError – Validation failed or generation could not complete.