Пример #1
0
        protected override GH_GetterResult Prompt_Singular(ref X value)
        {
            var selected = SelectionUtils.SelectEntity(SubentType, SelFilter, false);

            if (selected == null)
            {
                return(GH_GetterResult.cancel);
            }

            var docName = Application.DocumentManager.MdiActiveDocument.Name;

            value = CreateParameter(selected[0], docName);
            return(GH_GetterResult.success);
        }
Пример #2
0
        protected override GH_GetterResult Prompt_Plural(ref List <X> values)
        {
            var selected = SelectionUtils.SelectEntity(SubentType, SelFilter, true);

            if (selected == null)
            {
                return(GH_GetterResult.cancel);
            }

            var docName = Application.DocumentManager.MdiActiveDocument.Name;

            values = selected.Select(subent => CreateParameter(subent, docName)).ToList();
            return(GH_GetterResult.success);
        }