Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
GeoStudio | PLAXIS
  • Product Communities
GeoStudio | PLAXIS
GeoStudio | PLAXIS Wiki Application of commands: Groupfiltered and Apply
    • 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
          • Effect of suction on soil strength, compressibility and slope stability
          • 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 for materials in PLAXIS Input
          • 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. 

    Application of commands: Groupfiltered and Apply

    Application PLAXIS 2D
    PLAXIS 3D
    Version PLAXIS 2D 2015
    PLAXIS 3D
    Date created 15 July 2014
    Date modified 15 July 2014

    groupfiltered (grpf)

    The groupfiltered command (with grpf being the alternative, short version of the command) operates like the normal filter command followed by a group command on the result. This is useful for parametrization, as it can be used to store intermediate results of queries. For example if you would want to get all points with 0 < x < 2, you can do this:

    0003> point (0 0 0) (1 1 1) (2 2 2)
        Added Point_1
        Added Point_2
        Added Point_3
    0004> groupfiltered Points "x<2"  # expect only the first two points 
        Added group Group_1 containing 2 items
    0005> echo Groups[-1]
        Group named "Group_1"
        Contents (2): Point_1, Point_2
    0006> groupfiltered Groups[-1] "x>0"  # only those items in the last created group that fulfill this condition 
        Added group Group_2 containing 1 items
    0007> echo Groups[-1]  # should contain Point_2, which is the only with 0 < x < 2 
        Group named "Group_2"
        Contents (1): Point_2
    0008> ungroup Groups[-2]  # throw away the intermediate group 
        Disbanded group Group_1
        

    apply (map)

    The apply command (with map being the alternative command) applies a command to multiple objects at once. This takes as parameters any list-like object, a command name and a set of parameters. It then loops over the contents of the list-like object and fires the specified command with the provided parameters on that object.

    For example if you want to set the "x" value of all points to some value, you can do this:

    0007> point (0 0 0) (1 1 1) (2 2 2)
        ...
    0008> apply Points "setproperties" "x" 3
        OK
    0009> tabulate Points "x"
        Object   x
        Point_1  3
        Point_2  3
        Point_3  3
        

    In order for this to work, the object itself must implement the command in question (see the commands reference for this, or run cms MyObject to check which commands are available for any given object). For example the delete command is NOT implemented by a point, but by some higher-level object. You can therefore not use apply with delete in order to remove points.

    Note: Undo stack: when you run apply it's as if you run multiple commands individually: there will be multiple undos.

    The apply command will succeed if any of its subcommands succeeds. All outputs are however gathered in one big output: if one subcommand fails and some others do not, the entire result will be successful, but the feedback will contain information on the failure.

    Example: Change material properties

    In some cases, one wants to change one parameter for all (soil) materials. This can easily be done using the apply command:

    apply Materials "sps" "psi" 2

    This will apply the sps (setproperties) command to all Materials in the current model in order to change the value for ψ (psi) to 2°.

    Combining the two: Groupfiltered and Apply

    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 (see menu item Expert > Macro library) for it:

    groupfiltered Phases "PreviousPhase!="  # all except the initial phase 
    apply Groups[-1] "setproperties" "MaxCores" 2 "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 only have the initial phase, as that would try to create an empty group at the beginning.

    Apply to groups from Structures mode

    When defining a group in Structures mode, this group is accessible in the green modes (Mesh, Water/Flow conditions, Staged Construction). However, the apply command does not work directly on these groups from Soil/Structures mode in the green modes. Note: it does work correctly on groups made in the same (green) mode though.
    Since PLAXIS 2D 2015, we can now use the apply command to easily set a parameter for the entire Structures mode- group using the command line, by calling the apply command on the apply command.

    Settings mesh coarseness for a group

    Say we made a group of polygons and lines in Structures mode, called Group_1, and in Mesh mode we want to change the local mesh coarseness for all group members to 0.75, we need to call the apply command on the group members, like this:

    apply Group_1 "apply" "sps" "CoarsenessFactor" 0.75

    Changing materials for a group

    When you make a group of volumes in Structures mode called Group_X, and you want to apply the same material, e.g. Concrete1, in a phase, say Phase_X, this is how the command should look:

    map Group_X "map" "setmaterial" Phase_X Concrete1

     

    See also

    Application of commands: Referring to objects through their index

    [Tips and Tricks]


    Application of commands: echo

    [Tips and Tricks]


    Macros using the commands runner

    [Tips and Tricks]

    • PLAXIS 3D
    • Groups
    • commands
    • Filter
    • PLAXIS
    • Command Line
    • apply
    • Map
    • 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:10 AM
    • Micha van der Sloot Last revision by Bentley Colleague Micha van der Sloot
    • When: Tue, Dec 24 2019 6:14 AM
    • Revisions: 2
    • 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