[TransactionAttribute(Autodesk.Revit.Attributes.TransactionMode.Manual)]
cmd : IExternalCommand
{
Result Execute(ExternalCommandData commandData, messages, ElementSet elements)
{
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
Selection sel = uiApp.ActiveUIDocument.Selection;
Transaction ts = Transaction(doc, );
ts.Start();
ObjectSnapTypes snapTypes = ObjectSnapTypes.Endpoints | ObjectSnapTypes.Intersections;
XYZ point = uiApp.ActiveUIDocument.Selection.PickPoint();
TaskDialog.Show(, point.ToString());
ts.Commit();
Result.Succeeded;
}
}url: