/
spruttechnology
/
cam-api-examples
Обзор
Документация
Войти
/
spruttechnology
/
cam-api-examples
Код
Запросы
3
Задачи
Пакеты
0
Релизы
1
Аналитика
v19/develop
GeometryModelNodePopup/NodeFullNameAlert/project/main/ExtensionGeomModelNodePopup.cs
35 строк
1 KB
renal
Stabilization with fresh update of CAM
10 апр 2026, 15:28
10 апр 2026, 15:28
ff452f8
Код
Авторство
О чём код?
using CAMAPI.Extensions; using CAMAPI.GeometryModelForm; using CAMAPI.ResultStatus; namespace NodeFullNameAlert; /// <summary> /// Extension to demonstrate entry point "geom_model_node_popup" /// </summary> public class ExtensionGeomModelNodePopup : IExtension, IExtensionGeomModelNodePopup { /// <inheritdoc /> public IExtensionInfo? Info { get; set; } /// <summary> /// Add a popup item that shows the full name of the selected geometry tree node /// </summary> /// <param name="context">Context containing the selected node and the popup items collection</param> /// <param name="resultStatus">Object to contain some message to calling code</param> public void Build(IExtensionGeomModelNodePopupBuildContext context, out TResultStatus resultStatus) { resultStatus = default; try { var popupItems = context.NodePopup; popupItems.AddItem("ShowNodeFullName", "Show node full name", true, new NodeFullNameAlertOnClicked(), out resultStatus); } catch (Exception ex) { resultStatus.Code = TResultStatusCode.rsError; resultStatus.Description = ex.Message; } } }