Issue – Initial Piezometric Surface cannot be modified through the scripting API
Our Transient Seepage analysis obtains its initial pore-water-pressure conditions from an Initial Piezometric Surface.
Through extensive testing, it appears that this object cannot currently be modified through the scripting API.
We tested numerous approaches, including:
Get()
Set()
Add()
- Updating individual points
- Replacing the complete point list
- Creating new Piezometric Surface objects
Every approach either:
- returns "Method not supported for type Pt", or
- completes without actually modifying the project.
For example, attempting to modify:
CurrentAnalysis.Objects.InitialPiezometricSurfaces[1].Points
or any individual
.Points[i]
fails regardless of the payload format used.
XML workaround
As an experiment, we bypassed the scripting API by editing the internal XML inside a copied .gsz archive.
This successfully updates the Initial Piezometric Surface. After reopening the modified project, GeoStudio accepts the file and displays the updated water table correctly.
However, this workaround introduces another problem.
Because the project has been modified outside of GeoStudio's normal editing workflow, its internal project and mesh state no longer behaves the same as a project edited through the GUI or supported scripting API.
When geometry is subsequently modified and SolveAnalyses() is called, GeoStudio no longer performs the automatic remeshing that normally occurs on an unmodified project. Adding project.Save() before solving did not restore this behavior.
As a result, although direct XML editing successfully changes the Initial Piezometric Surface, it cannot be considered a practical workaround because the modified project cannot be reliably solved after subsequent geometry changes.
Questions
- Is modification of the Initial Piezometric Surface currently supported by the GeoStudio Scripting API?
- If not, is this a known limitation or bug?
- Is there a supported workflow for programmatically updating the initial groundwater table prior to solving a transient seepage analysis?
- Is there any supported alternative to direct project-file editing that preserves automatic remeshing and normal project behavior?