<?xml version="1.0" encoding="utf-8"?>
<model version="1.0">
  <root>
    <folder label="Helpers">
      <snippet label="Project"><![CDATA[${1:project} = ExtAPI.DataModel.Project]]></snippet>
      <snippet label="Mesh"><![CDATA[${1:mesh} = ExtAPI.DataModel.Project.Model.Mesh]]></snippet>
      <snippet label="Geometry"><![CDATA[${1:geometry} = ExtAPI.DataModel.Project.Model.Geometry]]></snippet>
      <snippet label="Analysis"><![CDATA[${1:analysis} = ExtAPI.DataModel.Project.Model.Analyses[${2:0}]]]></snippet>
      <snippet label="ObjectsByName"><![CDATA[${1:solution} = ExtAPI.DataModel.Tree.GetObjectsByName("${2:Solution}")]]></snippet>
      <snippet label="PathToFirstActiveObject"><![CDATA[${1:path_to_object} = ExtAPI.DataModel.Tree.GetPathToFirstActiveObject()]]></snippet>
      <snippet label="ObjectsByType"><![CDATA[${1:coordinate_system_list} = ExtAPI.DataModel.Tree.GetObjectsByType(${2:DataModelObjectCategory.CoordinateSystem})]]></snippet>
      <snippet label="ActiveObjects"><![CDATA[${1:active_objects} = ExtAPI.DataModel.Tree.ActiveObjects]]></snippet>
      <snippet label="FirstActiveObject"><![CDATA[${1:first_active_object} = ExtAPI.DataModel.Tree.FirstActiveObject]]></snippet>
      <snippet label="Quantity"><![CDATA[Quantity("${1:1} [${2:mm}]")]]></snippet>
    </folder>
    <folder label="Examples">
      <snippet label="AddPressure"><![CDATA["""The following example creates a pressure on the first face of the first body for the first part."""
model = ExtAPI.DataModel.Project.Model
pressure = model.Analyses[0].AddPressure() # Add a pressure.
part1 = model.Geometry.Children[0]  # Get the first part.
body1 = part1.Children[0]  # Get the first body.
face1 = body1.GetGeoBody().Faces[0]  # Get the first face of the body.
selection = ExtAPI.SelectionManager.CreateSelectionInfo(SelectionTypeEnum.GeometryEntities)  # Create an empty selection.
selection.Entities = [face1]  #  Add the face to the selection.
pressure.Location = selection  # Assign the selection to the pressure.
pressure.Magnitude.Inputs[0].DiscreteValues = [Quantity("0 [s]"), Quantity("1 [s]")]  # Set the time values.
pressure.Magnitude.Output.DiscreteValues = [Quantity("10 [Pa]"), Quantity("20 [Pa]")]  # Set the magnitudes.
]]></snippet>
    </folder>
  </root>
</model>
