当前位置: 首页>>代码示例>>C#>>正文


C# GH_Component.AddParameter方法代码示例

本文整理汇总了C#中GH_Component.AddParameter方法的典型用法代码示例。如果您正苦于以下问题:C# GH_Component.AddParameter方法的具体用法?C# GH_Component.AddParameter怎么用?C# GH_Component.AddParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GH_Component的用法示例。


在下文中一共展示了GH_Component.AddParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterInputParams

 /// <summary>
 /// Registers all the input parameters for this component.
 /// </summary>
 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddGenericParameter("ids", "ids", "input objects ids", GH_ParamAccess.list);
     pManager.AddIntegerParameter("Copies", "C", "Copies", GH_ParamAccess.item, 1);
     pManager.AddIntegerParameter("Priority", "P", "Priority", GH_ParamAccess.item, 1);
     pManager.AddParameter(new Orientation(), "Orientation", "O", "Orientation", GH_ParamAccess.item);
     // Ha de ser un ObjectOrientation
     pManager.AddParameter(new Criterion(), "Criterion", "Cr", "Criterion", GH_ParamAccess.item);
 }
开发者ID:olitur,项目名称:rhinonest-grasshopper,代码行数:12,代码来源:RhinoNestObjectGetter.cs

示例2: RegisterInputParams

        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            IGH_Param param1 = new SODesigner_GHParam();
            param1.Optional = true;
            pManager.AddParameter(param1, "Designers", "d", "Register a designer output (or more than one) as input", GH_ParamAccess.list);

            IGH_Param param2 = new SOAnalysis_GHParam();
            param2.Optional = true;
            pManager.AddParameter(param2, "Analysis", "a", "Register an analysis output (or more than one) as input", GH_ParamAccess.list);
        }
开发者ID:sustainability-open,项目名称:sustainability-open,代码行数:10,代码来源:SOAnalysis_Component.cs

示例3: RegisterInputParams

 //set up input parameters - auth token, name, worksheets, include blank cells, spreadsheet range, row/column order, formulas/values, and a refresh toggle.
 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddParameter(new AuthToken_Param(), "Token", "T", "Google Authentication Token, obtained with Google Authenticator component.", GH_ParamAccess.item);
     pManager.AddTextParameter("Name", "N", "Name of the spreadsheet to query", GH_ParamAccess.item);
     pManager.AddTextParameter("Worksheet", "W", "Optional Worksheet name", GH_ParamAccess.item);
     pManager[2].Optional = true; //worksheets optional
     pManager.AddBooleanParameter("Include Blank Cells?", "B", "Set to true to include blank cells in data output.", GH_ParamAccess.item,false);
     pManager.AddParameter(new Range_Param(), "Spreadsheet Range", "SR", "Range of cells to query.", GH_ParamAccess.item);
     pManager[4].Optional = true; //spreadsheet range optional
     pManager.AddBooleanParameter("Organize by Rows or Columns", "R/C", "Set to true to organize data output by row - otherwise data is structured by column.", GH_ParamAccess.item,false);
     pManager.AddBooleanParameter("Read Formulas or Values", "F/V", "Set to true to return formulas rather than values from the spreadsheet", GH_ParamAccess.item,false);
     pManager.AddBooleanParameter("Refresh", "R", "Send a new value to this parameter to cause the spreadsheet data to refresh.", GH_ParamAccess.tree, true);
 }
开发者ID:ptierney,项目名称:leafcutter,代码行数:14,代码来源:ReadSpreadsheet.cs

示例4: RegisterInputParams

 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     var p = new GH_TurtleMeshParam();
     p.Name = "TurtleMesh";
     p.NickName = "T";
     pManager.AddParameter(p);
 }
开发者ID:goznauk,项目名称:TurtleMesh,代码行数:7,代码来源:ToObjTextComponent.cs

示例5: RegisterInputParams

        //set up input parameters - token, filter, and refresh trigger
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddParameter(new AuthToken_Param(), "Token", "T", "Google Authentication Token, obtained with Google Authenticator component.", GH_ParamAccess.item);
            //description of filter parameter
            string desc = string.Concat(new string[]
                {
                    "Allows you to filter spreadsheets from your drive.",
                    "\n",
                    "Filter is case sensitive.",
                    "\n",
                    "The following wildcards are allowed:",
                    "\n",
                    "? (any single character)",
                    "\n",
                    "* (zero or more characters)",
                    "\n",
                    "# (any single digit [0-9])",
                    "\n",
                    "[chars] (any single character in chars)",
                    "\n",
                    "[!chars] (any single character not in chars)"
                });
            pManager.AddTextParameter("Filter", "F", desc, GH_ParamAccess.item);
            pManager[1].Optional = true; //filter is optional
            pManager.AddBooleanParameter("Refresh", "R", "Send a new value to this parameter to cause the list of spreadsheets to refresh.", GH_ParamAccess.tree, true);

            //refresh parameter value is never actually used, but any new data passed into it will trigger a new solveinstance.
        }
开发者ID:ptierney,项目名称:leafcutter,代码行数:29,代码来源:SpreadsheetList.cs

示例6: RegisterOutputParams

 protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
 {
     var p = new GH_TurtleMeshParam();
     p.Name = "TurtleMesh";
     p.NickName = "T";
     p.Access = GH_ParamAccess.list;
     pManager.AddParameter(p);
 }
开发者ID:goznauk,项目名称:TurtleMesh,代码行数:8,代码来源:ExplodeTMeshesComponent.cs

示例7: RegisterInputParams

        //set up component inputs - the token, name, worksheets, data to searh for, and cell offset.
        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddParameter(new AuthToken_Param(), "Token", "T", "Google Authentication Token, obtained with Google Authenticator component.", GH_ParamAccess.item);
            //above is custom AuthToken_Param type
            pManager.AddTextParameter("Name", "N", "Name of the spreadsheet to query", GH_ParamAccess.item);
            pManager.AddTextParameter("Worksheet", "W", "Optional Worksheet name", GH_ParamAccess.item);
            pManager[2].Optional = true; //worksheets are optional
            pManager.AddTextParameter("Data", "D", "Data to search for in spreadsheet", GH_ParamAccess.list);

            // This is a quick and dirty way to allow the user to specify offsets by name instead of the corresponding integer value,
            // even though the parameter is just taking in an integer.
            pManager.AddIntegerParameter("Offset", "O", "An optional cell offset for address output.", GH_ParamAccess.item,0);
            Param_Integer offset = (Param_Integer)pManager[4];
            offset.AddNamedValue("No Offset", 0);
            offset.AddNamedValue("+1 Row", 1);
            offset.AddNamedValue("+1 Column", 2);
        }
开发者ID:ptierney,项目名称:leafcutter,代码行数:18,代码来源:FindCellAddress.cs

示例8: RegisterInputParams

 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     SODesigner_GHParam param1 = new SODesigner_GHParam();
     param1.Optional = true;
     pManager.AddParameter(param1, "d", "d", "Designer input", GH_ParamAccess.list);
 }
开发者ID:sustainability-open,项目名称:sustainability-open,代码行数:6,代码来源:SODesigner_Component.cs

示例9: RegisterInputParams

 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddParameter(new PlanktonGh.GH_PlanktonMeshParam(), "PlanktonMesh", "PMesh", "The input PlanktonMesh to thicken the edges of", GH_ParamAccess.item);
     pManager.AddNumberParameter("Radius", "R", "Strut thickness. Either one value to be applied across the whole mesh, or a list of values per vertex of the Plankton mesh(note - these are not ordered the same as the vertices of the grasshopper mesh!)", GH_ParamAccess.list, 0.2);
     pManager.AddBooleanParameter("Dual", "D", "If true, the edges of the dual will be thickened (NOT WORKING YET FOR OPEN MESHES!)", GH_ParamAccess.item, false);
 }
开发者ID:nsbcnjsbc,项目名称:Exoskeleton2,代码行数:6,代码来源:Cytoskeleton.cs

示例10: AddDefaultInput

 protected override void AddDefaultInput(GH_Component.GH_InputParamManager inputManager)
 {
     inputManager.AddParameter(ConstructVariable(GH_VarParamSide.Input, "x"));
       inputManager.AddParameter(ConstructVariable(GH_VarParamSide.Input, "y"));
 }
开发者ID:spearfish,项目名称:ghpython,代码行数:5,代码来源:PythonComponent.cs

示例11: RegisterInputParams

 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddParameter(new HashParam(), "Hash", "H", "Input hash", GH_ParamAccess.item);
 }
开发者ID:arendvw,项目名称:ExportTools,代码行数:4,代码来源:ExplodeHashComponent.cs

示例12: RegisterInputParams

 /// <summary>
 /// Registers all the input parameters for this component.
 /// </summary>
 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddParameter(new HashParam(), "Hash", "H", "Hash input", GH_ParamAccess.list);
     this.Params.Input[0].DataMapping = GH_DataMapping.Flatten;
     pManager.AddTextParameter("Filename", "F", "The destination file of the hash", GH_ParamAccess.item);
     pManager.AddBooleanParameter("Append", "A", "Append to file", GH_ParamAccess.item, true);
     pManager.AddBooleanParameter("genId", "I", "Generate unique ID column", GH_ParamAccess.item, true);
     pManager.AddTextParameter("Seperator", "S", "String to seperate columns", GH_ParamAccess.item, ";");
 }
开发者ID:arendvw,项目名称:ExportTools,代码行数:12,代码来源:HashToCsvComponent.cs

示例13: RegisterOutputParams

 protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
 {
     SOAssessment_GHParam param = new SOAssessment_GHParam();
     pManager.AddParameter(param, "Assessments", "as", "Assessment output", GH_ParamAccess.item);
 }
开发者ID:sustainability-open,项目名称:sustainability-open,代码行数:5,代码来源:SOAssessment_Component.cs

示例14: RegisterInputParams

 //set up input parameters - token, name, worksheets, row/column, address, data, and write toggle
 protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
 {
     pManager.AddParameter(new AuthToken_Param(), "Token", "T", "Google Authentication Token, obtained with Google Authenticator component.", GH_ParamAccess.item);
     pManager.AddTextParameter("Name", "N", "Name of the spreadsheet to query", GH_ParamAccess.item);
     pManager.AddTextParameter("Worksheet", "W", "Optional Worksheet name", GH_ParamAccess.item);
     pManager[2].Optional = true; //worksheets optional
     pManager.AddBooleanParameter("Organize by Rows or Columns", "R/C", "Set to true to organize data input by row - otherwise data is structured by column.", GH_ParamAccess.item, false);
     pManager.AddTextParameter("Address", "A", "Cell address in A1 notation at which to start writing.", GH_ParamAccess.tree);
     pManager.AddTextParameter("Data", "D", "Data to send to spreadsheet. Lists of data are sent sequentially in row/column order.", GH_ParamAccess.tree);
     pManager.AddBooleanParameter("Write", "Wr", "Set to true to activate spreadsheet writing.", GH_ParamAccess.item,false);
 }
开发者ID:ptierney,项目名称:leafcutter,代码行数:12,代码来源:WriteToSpreadsheet.cs

示例15: RegisterOutputParams

 protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
 {
     pManager.AddParameter(new SOAnalysis_GHParam(), "Analysis", "a", "Analysis output", GH_ParamAccess.item);
 }
开发者ID:sustainability-open,项目名称:sustainability-open,代码行数:4,代码来源:SOAnalysis_Component.cs


注:本文中的GH_Component.AddParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。