Skip to content

Instantly share code, notes, and snippets.

View dalenicholls's full-sized avatar

Dale Nicholls dalenicholls

View GitHub Profile
// I'm a single line comment
/*
I'm a comment too
multi-line style
*/
// these are references that Tekla Structures need to understand the code we've written.
using Tekla.Structures;
using Tekla.Structures.Model;
using Tekla.Structures.Drawing;
namespace Tekla.Technology.Akit.UserScript
{
public class Script
{
public static void Run(Tekla.Technology.Akit.IScript akit)
// intialises a new Model instance
Model model = new Model();
// stores the current workplane for it to restore later
TransformationPlane transformationplane = model.GetWorkPlaneHandler().GetCurrentTransformationPlane();
// resets the workplane
model.GetWorkPlaneHandler().SetCurrentTransformationPlane(new TransformationPlane());
// initialises a new Picker instance
Tekla.Structures.Model.UI.Picker picker = new Tekla.Structures.Model.UI.Picker();
// calls for the user to pick a point and stores it in 'point'
Tekla.Structures.Geometry3d.Point point = picker.PickPoint();
// Generated by Tekla.Technology.Akit.ScriptBuilder
namespace Tekla.Technology.Akit.UserScript
{
public class Script
{
public static void Run(Tekla.Technology.Akit.IScript akit)
{
// ends current command
akit.CommandEnd();