Exemplo n.º 1
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Model model = null;

            DA.GetData(0, ref model);

            string CCXCommand = model.BuildCCXCommand(Environment.ProcessorCount, GHUtil.CCXPath(this.OnPingDocument()));

            DA.SetData(0, CCXCommand);
        }
Exemplo n.º 2
0
        /// <summary>
        /// This is the method that actually does the work.
        /// </summary>
        /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param>
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            bool  run     = false;
            int   threads = 0;
            Model input   = null;

            DA.GetData(0, ref run);
            DA.GetData(1, ref input);
            DA.GetData(2, ref threads);

            if (run)
            {
                Model model = input.Clone() as Model;
                model.SolveFromFile(threads, GHUtil.CCXPath(this.OnPingDocument()));
                DA.SetData(0, model);
            }
        }