-
Type
Console.WriteLine("Node Count = " +
nodeCount);
and then press Return.
The numerical nodeCount
value is concatenated
with some string to print in a readable format.
-
Type
Console.WriteLine("Beam Count = " +
beamCount);
.
Similarly, this is concatenating the beamCount
value, converted to a string, with some text and displaying that result to
the terminal.
Your final program should look
like:using System;
using System.Runtime.InteropServices;
namespace OSEOMConsoleApp
{
class Program
{
static void Main (string[] args)
{
OpenSTAADUI.OpenSTAAD os = Marshal.GetActiveObject("StaadPro.OpenSTAAD") as OpenSTAADUI.OpenSTAAD;
OpenSTAADUI.OSGeometryUI geometry = os.Geometry;
int nodeCount = geometry.GetNodeCount();
int beamCount = geometry.GetMemberCount();
Console.WriteLine("Node Count = " + nodeCount);
Console.WriteLine("Beam Count = " + beamCount);
Console.ReadLine();
}
}
}