API Basics
- Basics
- Code snippets,
Code Example
private void button1_Click(object sender, EventArgs e)
{
// Create a new Model object that represents the Tekla Structures Model you have opened in Tekla Structures.
Model myModel = new Model();
// Check if we have a Tekla Structures Model that you can connect to.
if (myModel.GetConnectionStatus())
{
// Create a new instance of the Beam class based on created start and end points for the beam.
Beam myBeam = new Beam(new TSG.Point(1000, 1000, 1000), new TSG.Point(6000, 6000, 1000));
// Set the Beams Material and Profile.
myBeam.Material.MaterialString = "S235JR";
myBeam.Profile.ProfileString = "HEA400";
}
}