Esempio n. 1
0
        protected override void RemoveInput()
        {
            var count = InPortData.Count;

            if (count > 0)
            {
                InPortData.RemoveAt(count - 1);

                //this node will always have one input
                //so the inputs collection will be one larger
                //than the outputs
                OutPortData.RemoveAt(count - 2);
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     It removes all the in ports and out ports so that the user knows there is an error.
        /// </summary>
        /// <param name="errorMessage"> Error message to be displayed </param>
        private void ProcessError()
        {
            dynSettings.Controller.DynamoLogger.Log("Error in Code Block Node");

            //Remove all ports
            int size = InPortData.Count;

            for (int i = 0; i < size; i++)
            {
                InPortData.RemoveAt(0);
            }
            size = OutPortData.Count;
            for (int i = 0; i < size; i++)
            {
                OutPortData.RemoveAt(0);
            }
            RegisterAllPorts();

            previewVariable = null;
        }