Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
GeoStudio | PLAXIS
  • Product Communities
GeoStudio | PLAXIS
GeoStudio | PLAXIS Wiki Macros using the commands runner
    • Sign In
    • -Geotechnical Analysis Wiki
      • +GeoStudio
      • -PLAXIS
        • +Software and License - PLAXIS
        • +Documentation - PLAXIS
        • +API / Python scripting - PLAXIS
        • +Known issues - PLAXIS
        • +Models - PLAXIS
        • -Tips and Tricks
          • 3D Extrusion along a curved path
          • 3D Output: show results for shadings or contour lines
          • 64 bit User Defined Soil model
          • After a consolidation analysis I have excess pore pressures in "drained" material sets. Why?
          • An error occurred in the application – What to do
          • Application of commands: echo
          • Application of commands: Groupfiltered and Apply
          • Application of commands: Referring to objects through their index
          • Calculation Kernel Convergence log
          • Can I import a geometry in PLAXIS 2D?
          • Can I reuse existing PLAXIS 3D geometrical objects in a new project?
          • Change temporary folder for intermediate calculation data files
          • Closing PLAXIS after your calculation is finished
          • CodeMeter network error during calculation (IPv4/v6 conflict)
          • Codemeter Network Installation
          • Codemeter USB Stick behaviour
          • Command line reference
          • Compliant base and free field boundaries: check on input signal
          • Composite liner approach in PLAXIS 2D
          • Connect a node-to-node anchor with an embedded beam row halfway
          • Considerations for modelling a thick slab as a plate
          • Consolidation: Minimum Pore Pressures and Degree of Consolidation analysis may give spurious displacements of boundary nodes
          • Conversion from 2D Version 8/9
          • Conversion of PLAXIS 2D files
          • Copy/Array command in Plaxis 2D
          • Create centerline for Structural Forces in Volumes
          • Create rock bolts accurately in PLAXIS 3D
          • Creating axial force curve for Fixed End anchors
          • Deactivated loads are still visible in PLAXIS Output
          • Definition of a bending moment as load
          • Definition of Hoek-Brown model parameters in Plaxis
          • Drained Settlement Vs. Consolidation: Differences at Failure in Output
          • Drift correction for dynamic input signal from file
          • During a calculation some plastic points disappear. How is that possible?
          • Dynamic Load with Perpendicular Distribution
          • Encrypted scripting server vulnerable to replay attacks
          • End bearing of plates
          • Energy saving while running multiple calculations
          • Error when generating 3D mesh
          • Export and format plots from PLAXIS Output
          • Export or reuse geometry for New Analysis
          • Extended command syntax for mesh generation
          • Fixed and Compliant base: what input motion is required?
          • Fixities and deformation boundary conditions
          • Force envelope results explained
          • Fundamentals of pseudo-static analysis in PLAXIS
          • General modeling guidelines - recommendations
          • Graphics card issues
          • Groundwater flow analysis in PLAXIS – Brief overview
          • How do I import a geometry in PLAXIS 3D?
          • How does Plaxis deal with water pressures during dynamic calculations?
          • How does Reset displacements to zero work?
          • How does the option volumetric strain work?
          • How to activate a dynamic load
          • How to change the PLAXIS model width
          • How to check undrained shear strength using Undrained A?
          • How to convert PLAXIS V21 material database to the V22 format
          • How to define and edit a material via the command line
          • How to get a load - displacement curve using SumMstage
          • How to prescribe a dynamic displacement
          • How to run a Limit Equilibrium Method analysis from PLAXIS 2D
          • How to select more than 10 nodes to be used for a curve
          • How to setup the number of steps stored in PLAXIS Input
          • How to setup tied degrees of freedom
          • How to use command log files
          • How to validate a material via the GUI and command line
          • Hydraulic conductivity input in PLAXIS using van Genuchten functional forms in a groundwater flow analysis
          • I use PLAXIS and it says I do not have the proper entitlements
          • Improving speed of mesh generation in combination with stage generation
          • In Plaxis Curves it is possible to plot Force Fx, Fy and Fz. What are these parameters?
          • Initial degree of saturation for soil activated during staged construction
          • InputSettings object in Output
          • Inspect intermediate step results in PLAXIS Output
          • Install latest 2D version and 2D AE for converting older files
          • Is it possible to apply a distributed load on tunnel lining in PLAXIS 2D?
          • Is PLAXIS 3D 64-bit?
          • Is PLAXIS 3D enabled for multicore?
          • Iterative settings: desired minimum and maximum
          • Iterative settings: Influence of Arc length control
          • Iterative settings: Max unloading steps (arc length control)
          • Key not bound to machine
          • Language reset in PLAXIS 2D and 3D
          • Launch PLAXIS 2D calculations via DOS commands
          • Load activation in time
          • Local axis and its colour indication
          • Macros using the commands runner
          • Material datasets for plates: sheet pile wall in bending
          • Materials overview in the Model explorer
          • Memory usage in dynamic calculations
          • Mesh alignment in flow problems
          • Mesh generation might not work under Windows 7 due to security settings
          • Modelling a tapered pile
          • Modelling Rock mass using discrete discontinuities vs Jointed Rock
          • Modelling soil-structure interaction: interfaces
          • Modelling technique: Vacuum consolidation
          • Modifying boundary conditions
          • Multicore CPU and 32/64-bit
          • NATM Tunneling - Beta Method: Incomplete Staged construction method vs. Deconfinement method
          • Node-to-Node anchors as an alternative for Fixed-End anchors
          • Non-consecutive order of step numbers in Plaxis
          • Obtain Object names easily to use in commands
          • Obtaining tabulated data from PLAXIS Input
          • Obtaining time-dependent flow results at specific timestamps in a given time interval in Flow only calculations
          • On different failure criteria for soils
          • On the initialisation of the temperatures of solid elements
          • On the use of dynamic boundary conditions
          • Opening old PLAXIS project gives a popup window. What should I do?
          • Output of flow results through interfaces
          • Output project compatibility
          • Permeability in interfaces
          • Permeability in interfaces: Practical situations
          • Pile modelling in a 2D plane strain model
          • PLAXIS 2D Command compatibility notes
          • PLAXIS 3D 2013 and older PLAXIS files
          • PLAXIS 3D 2016: Fully parametric geometry
          • PLAXIS 3D Command compatibility notes
          • PLAXIS Legacy version and supported CodeMeter drivers
          • PLAXIS Output Phase/Step object compatibility
          • PLAXIS Silent Installation
          • PLAXIS Soil model numbers in command line
          • Plaxis uses SMC files for earthquakes, but what kind of format is this?
          • Points of interest for pile modelling in a 2D plane strain model
          • Problems related to non-associated plasticity
          • Program responds that drivers are out of date, but I have a newer version installed
          • Pseudo static acceleration
          • Re-use materials from other projects
          • Reduction of stiffness does not lead to a change in displacements
          • Regenerate staged construction
          • Run multiple calculations easily
          • Safety analysis and displacements
          • Safety analysis and undrained behaviour
          • Safety analysis and Updated Mesh
          • Safety calculation with a Target Value
          • Saving PLAXIS files for an older version
          • Select points for curves prior to calculation directly in Input
          • Selecting points for curves
          • Set multiple phases to be calculated
          • Showing a list of embedded beams by length
          • Small overlaps curves message in SoilTest optimisation
          • Smart selection of line elements in PLAXIS 2D Input
          • Stiffness units for structural elements in an axisymmetric model
          • Stress relaxation due to creep in concrete structures
          • Stresses in non-porous materials
          • Structural results in tables and curve plots
          • Swept meshing in PLAXIS 3D
          • Tensile behaviour in the Hoek-Brown model
          • Tension cut-off in interfaces for User Defined Soil Models
          • Time step used in dynamic calculation
          • Trim and extend a line in PLAXIS 2D
          • Tunnels in PLAXIS 3D: Extrusions and cutting planes
          • Unable to select points for curves
          • Unable to select structures or nodes
          • Use of wells in PLAXIS 3D
          • Using an accelerogram for Dynamics
          • Using partial geometry for interesting result images in PLAXIS 3D
          • Using PLAXIS Remote scripting with the Python wrapper
          • Waterlevel inspection and editing in PLAXIS 2D
          • Westergaard's added mass for hydrodynamic pressures: a simple case
          • +Working from home with PLAXIS
        • +Publications
        • +Videos - PLAXIS
      • +PLAXIS Monopile Designer
      • +PLAXIS LE
      • +SOILVISION
      • +Geotechnical SELECT Entitlements [GSE]
      • +Subscription Entitlement Service

     
     Questions about this article, topic, or product? Click here. 

    Macros using the commands runner

    Application PLAXIS 2D
    PLAXIS 3D
    Version PLAXIS 2D
    PLAXIS 3D
    Date created 08 June 2015
    Date modified 08 June 2015

    When using certain command templates multiple times, it would be helpful if you can re-play these commands with just a single click. With a Macro you can do this: you can easily play a set of predefined commands.

    Creating a macro

    To create a macro:

    • Go to the Macro library menu item (available under the Expert menu)
    • Here choose to manage the library
    • And add a new Macro
    • Give it a descriptive title
    • And add the commands you would like to perform when executing this macro

    Figure 1. The Macros library window

    Using a macro

    In order to make use of a macro, open the menu item Expert > Macro library > and here you will see the available macros. Now click on a macro to execute it.

    Figure 2. Macros in the Expert menu

    Keyboard shortcuts

    Next to using the menu item to run a macro, PLAXIS also offers to execute a command via a keyboard shortcut. The first macro will be accessible via the key combination Shift + Ctrl + Alt + 1. This keyboard shortcut is also shown in the menu Expert > Macro library, see in the image above.

    Examples

    Tip: to make any command more flexible and useful in any Plaxis model, use the Group Filtered and Apply commands [link] in combination with the possibility to refer to any object using their index [link]. See also the examples below.

    Calculation settings

    Let’s say you have a large project with many phases and want to switch all of them except the initial one to use

    • a max. of 2 CPUs (cores)
    • and you want to store 10 steps for each phase.

    You can write this macro for it:

    groupfiltered Phases "PreviousPhase!=" # all except the initial phase
    apply Groups[-1] "setproperties" "MaxCores" 2
    apply Groups[-1]"setproperties" "MaxStepsStored" 10
    ungroup Groups[-1]  # get rid of temporary group to leave model clean

    This will work regardless of how many phases and/or groups you already have. It will only fail if you just have the initial phase, as that would try to create an empty group at the beginning.

    Or, if you want to only change this for all the phases that are set to be calculated, we can add a new filter (groupfiltered command) to only use phases that are set to be calculated (ShouldCalculate == True), and then directly calculate it:

    gotostages
    groupfiltered Phases "ShouldCalculate=True"
    groupfiltered Groups[-1] "PreviousPhase<>"
    apply Groups[-1] "sps" "MaxCores" 2 #insert here the number of CPUs
    apply Groups[-1] "sps" "MaxStepsStored" 10 #max steps to save per phase
    ungroup Groups[-1]
    ungroup Groups[-1]
    calculate

    Switch to Updated Mesh

    To change all phases to use Updated Mesh, you can use this macro:

    gotostages
    groupfiltered Phases "ShouldCalculate=True"
    groupfiltered Groups[-1] "PreviousPhase<>"
    apply Groups[-1] "sps" "Deform.UseUpdatedMesh"
    True apply Groups[-1] "sps" "Deform.UseUpdatedWaterPressures" True #2D ONLY
    ungroup Groups[-1]
    ungroup Groups[-1]

    Note that UpdatedWaterPressures is currently (2015) only available in PLAXIS 2D.

    Geometry checks for meshing in PLAXIS 3D

    The tabulate command can also be used to detect if small surfaces or volumes are present in the intersected 3D geometry in the mesh mode. This could indicate problem areas for the 3D mesh generation.
    To check for small volumes ( < 1 m3), small surfaces (e.g. a surface area < 0.1 m2) and small lines, you can use this macro:

    tabulate SoilVolumes "Volume" "Volume<1"
    tabulate Volumes "Volume" "Volume<1"
    tabulate Surfaces "Area" "Area<0.1"
    tabulate Lines "Length" "Length<0.1"

    Show a table of safety factors

    To show a table of the SumMsf values, you can use this single command as a macro to quickly get this table in the Input program:

     tabulate phases "PreviousPhase Reached.ReachedMsf" "DeformCalcType=Safety"

    See also

    Application of commands: Groupfiltered and Apply

    [Tips and Tricks]


    Application of commands: Referring to objects through their index

    [Tips and Tricks]

    • PLAXIS 3D
    • Command
    • commands runner
    • PLAXIS
    • Command Line
    • Macro
    • PLAXIS 2D
    • Share
    • History
    • More
    • Cancel
    • Micha van der Sloot Created by Bentley Colleague Micha van der Sloot
    • When: Mon, Dec 23 2019 7:12 AM
    • Micha van der Sloot Last revision by Bentley Colleague Micha van der Sloot
    • When: Tue, Dec 24 2019 6:17 AM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies