Skip to content

Instantly share code, notes, and snippets.

@dalenicholls
Created October 11, 2017 14:30
Show Gist options
  • Save dalenicholls/dc065cc9f529e70739e73d6cfa0c30dc to your computer and use it in GitHub Desktop.
Save dalenicholls/dc065cc9f529e70739e73d6cfa0c30dc to your computer and use it in GitHub Desktop.
// 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();
// restores the workplane
model.GetWorkPlaneHandler().SetCurrentTransformationPlane(transformationplane);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment