Skip to content

Home > User Interface > Analyses > Analysis Sets Data > Python Scripts > Python Scripts Applications

Python scripts applications

What you can do with Python scripts

Python scripts can be used to modify and adapt the content of LOG files while they are being generated by the user interface within Analysis Sets.

LOG files are based on the following structure:

  • Sections: Sections include series of keywords which are used to define several model components of the same type. One section may include several items.

    Sections in the LOG file start and then ends with the following characters strings :

    C BeginSection: <Section_Name>
    C EndSection: <Section_Name>
    
  • Item: Item include several keywords which are used to define a single model component. One item may include several keywords.

    Items in the LOG file start and then ends with the following characters string:

    C Begin: <Item_Type> : <Item_ID_Number> : <Item_Name>
    C End: <Item_Type> : <Item_ID_Number> : <Item_Name>
    
  • Keyword: Keywords are the simpler instructions which are used to define properties of any model component.

Python scripts allow setting or update data in selected sections, items or keywords of any LOG file. The effect of scripts is limited to the following list of sections (sections that are not included below cannot be updated through script files):

  • Calculation parameters
  • Currents
  • Displacements
  • Loadings
  • Waves
  • Winds

Limitations

This section lists things that you cannot do (at least for the time being) with Python scripts:

  • Python scripts do not allow programming the user interface to create or modify model components in your model.

  • Python scripts doe not allow modifying the content of LOG file that were previously generated with the user interface and that are stored on your hard drive. The scripts automatically update the content of LOG files while they are being generated.

  • The content of the LOG files associated with the Default Analysis Set cannot be updated. This is because the analyses included in the Default Analysis Set are interpreted as individual analyses rather than series of analyses all included in an Analysis Set.

  • Python scripts do not allow updating any section you like in the LOG file. The effect of scripts is circumscribed to the following list of sections:

    • Calculation parameters

    • Currents

    • Displacements

    • Loadings

    • Waves

    • Winds

  • You cannot create new structural model components in your LOG files through these scripts.