IES VisualFoundation User's Guide
Script Overview

Introduction

The script feature in VisualFoundation is a powerful tool used to create models objects, generate service cases, apply loads, extract results, etc. using a command line interface. In addition to supporting the various Commands outlined in this Help File, the command line will accept any valid command in the C# Programming language (allowing the use of if statements, for loops, etc.). In addition to using the command line directly, more complex Scripts can be generated in any text file and read into the program. This allows models with complex geometry to be created, parametric studies to be performed, finite element meshes to be automatically refined until convergence, etc.

Command Line Basics

  1. Location
    1. The Script tool is accessed by selecting the Script tab at the bottom of the Find Tool. By default, the Script will replace the Find Tool when selected, but the two can be floated and docked independently if needed.
  2. Units
    1. Input and output are always in the current unit style. The style can be changed from the command line.
  3. Add Slabs
    1. Add circular, rectangular, or polygon slabs of specified sizes and location using the appropriate commands.
    2. The return value can be suppressed by using a semi-colon on at the end of the command.
    3. Information can be stored in variables and math can be performed in the command line. Variables circumvent the need to input the same number repeatedly. The example below uses variables to defined the center coordinates and the width of a rectangular slab (assuming the current unity style is Kips & Inches). Math is then used in the in the command line to define height of the slab as two times the width. Note: When storing a value in a variable, the line must end with a semicolon.
    4. Slabs of non-standard shape can be defined based on lists of the X and Y coordinates or based on an array of Locations. Note: Locations can be stored as variables and used to define various items in the model, allowing the items to perfectly coincide.
    5. The slab's reinforcement details (e.g. bar configuration, bar cover, design approach, etc.) can be defined using the various commands.
  4. Add Piles
    1. Piles can be added to the project at specific coordinates or Locations.
    2. Once the Pile is added, it will automatically be selected, and its properties can be modified in the Project Manager as usual. Alternatively, most of the properties can be defined when adding Piles from the command line. Several options are available, see the Commands page for a complete list. Note: Item names must be enclosed in quotes.
    3. The PickMaterial(), PickDatabaseSection(), or PickParametricSection() calls can be used to set the material or cross-section when their exact name is unknown. These command calls bring up the material or shape dialog box and then return the name of the selected item.
    4. The PickMaterial(), PickDatabaseSection(), or PickParametricSection() calls can also be used to set variables which can then be used when adding piles.
  5. Add Piers
    1. Similar to Piles, Piers can be added to the project at specific coordinates or Locations.
    2. Piers can be renamed if the name that is automatically generated is not satisfactory.
    3. There are various commands to modify the Pier parameters. See the Commands page for a complete list.
  6. Add Beams/Walls
    1. Beams and Walls can be added to the project based on start and end coordinates or locations.
    2. Various properties can be set when creating Beams or Walls.
    3. A variety of parameters can be modified for existing beams or walls.
    4. Beams and walls can be moved using the command line.
  7. Apply Loads
    1. Rectangular, Circular, Tubular, and Rings loads can be added to the model with various input options (i.e. service case, location, pressure type, etc.). Note: Use a negative magnitude to apply loads in the negative global direction.
    2. Individual slabs or the full boundary can also be loaded using the command line.
    3. A variety of options are available to apply loads to piers using the command line as outlined on the Commands page. In the example below, pier C1 is loaded in the D service case with a 5 kip sliding force in the X, a 10 kip sliding force in the Y, a 15 kip vertical force in the Z, a 100 kip-in moment about the X-axis, and a 200 kip-in moment about the Y-axis (assuming the current unity style is Kips & Inches).
    4. Both grade beams and walls are loaded using the LoadLine command which can take various inputs.
  8. Obtain Results
    1. The maximum or minimum displacement, moment, shear, or bearing pressure across all result cases or for a specified result case can be obtained using command line. Also, the command line can output the displacement, moment, shear, or bearing pressure at a specific location for a defined result case.
    2. The maximum or minimum pile force across all result cases can be obtained using command line. Also, the command line can output the force in a specified pile for a defined result case.
  9. Miscellaneous
    1. Integer Math: In the command line, the quotient of two integers is an integer which may not produce the intended result. See the C# Numeric Types Tutorial for more information.

C# Programming

The command line accepts any valid command in the C# Programming Language, allowing the use of if statements, for loops, etc. In the example below, a command is defined to describe the y coordinate of a parabola terms of x. The Pow(Double, Double) method of the .Net System Math Class is used to perform squared operation. A four loop is used to add the x and y coordinates of the slab to lists which are then used to define the slab. In addition to using the command line to program directly, more complex Scripts can be generated in any text file and read into the program.