Esempio n. 1
0
 public ListFlatten(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("List", typeof(object));
     AddInputPortToNode("Level", typeof(object));
     AddOutputPortToNode("List", typeof(object));
 }
Esempio n. 2
0
        public SetSearchRelation(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("SearchA", typeof(object));
            AddInputPortToNode("SearchB", typeof(object));
            StackPanel stackPanel = new StackPanel();

            //Grouping Mode

            stackPanel.Children.Add(new Label()
            {
                Content = "Relationship", Foreground = System.Windows.Media.Brushes.White, VerticalContentAlignment = System.Windows.VerticalAlignment.Bottom
            });
            ComboBox Relationship = new ComboBox()
            {
                ItemsSource = new List <string>()
                {
                    "AND", "OR"
                }
            };

            stackPanel.Children.Add(Relationship);
            AddControlToNode(stackPanel);

            AddOutputPortToNode("SearchSets", typeof(object));

            //Help
            this.ShowHelpOnMouseOver = true;
            this.BottomComment.Text  = "Create an AND/OR relation between Searchs";
        }
Esempio n. 3
0
        public ScriptingNode(VplControl hostCanvas)
            : base(hostCanvas)
        {
            scriptingControl = new ScriptingControl();

            scriptingControl.HighlightingComboBox.SelectionChanged += HighlightingComboBoxOnSelectionChanged;

            // Create new script File
            scriptingControl.CurrentFile = new CSharpScriptFile2();

            //scriptingControl.Height = 400;
            scriptingControl.Width = 600;
            //scriptingControl.DockPanel.Height = 400;
            IsResizeable = true;

            //scriptingControl.StartCompilingEventHandler += StartCompilingEventHandler;

            scriptingControl.StartCSharpCompilingEventHandler += StartCSharpCompilation;
            scriptingControl.StartPythonCompilingEventHandler += StartPythonCompilation;

            AddControlToNode(scriptingControl);

            AddInputPortToNode("Input", typeof(object));

            AddOutputPortToNode("Output", typeof(object));
        }
Esempio n. 4
0
        public RefreshClashTests(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("Tests", typeof(object));
            AddOutputPortToNode("Clash Tests", typeof(object));

        }
Esempio n. 5
0
 public StringContains(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("List", typeof(object));
     AddInputPortToNode("String", typeof(object));
     AddOutputPortToNode("Output", typeof(object));
 }
Esempio n. 6
0
 public RenameViewpoints(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("Viewpoints", typeof(object));
     AddInputPortToNode("Name", typeof(string));
     AddOutputPortToNode("Output", typeof(object));
 }
Esempio n. 7
0
        public TimerNode(VplControl hostCanvas) : base(hostCanvas)
        {
            AddOutputPortToNode("String", typeof(string));
            Button btnStart = new Button {
                Content = "Start Timer"
            };

            btnStart.Click += BtnStart_Click;
            tbInterval      = new TextBox()
            {
                Width = 80, Text = "1000", VerticalContentAlignment = System.Windows.VerticalAlignment.Center, VerticalAlignment = System.Windows.VerticalAlignment.Center
            };
            StackPanel panel = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            panel.Children.Add(new TextBlock()
            {
                Text = "计时器间隔", VerticalAlignment = System.Windows.VerticalAlignment.Center
            });
            panel.Children.Add(tbInterval);
            AddControlToNode(new TextBlock {
                Text = "MBot计时器(ms)"
            });
            AddControlToNode(panel);
            AddControlToNode(btnStart);

            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(1000);
            timer.Tick    += Timer_Tick;
        }
Esempio n. 8
0
 public FileFromPath(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("FilePath", typeof(object));
     AddOutputPortToNode("File", typeof(object));
     this.BottomComment.Text = "Creates File object from given file path.";
 }
Esempio n. 9
0
 public GetElementsInClash(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("ClashTest", typeof(object));
     AddOutputPortToNode("SelectionA", typeof(object));
     AddOutputPortToNode("SelectionB", typeof(object));
 }
Esempio n. 10
0
        public SetAppearanceBySelection(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("Selection", typeof(object));
            AddInputPortToNode("Color", typeof(System.Windows.Media.Color));
            AddInputPortToNode("Transparency", typeof(object));

            StackPanel stackPanel = new StackPanel();

            //Grouping Mode

            stackPanel.Children.Add(new Label()
            {
                Content = "Override", Foreground = System.Windows.Media.Brushes.White, VerticalContentAlignment = System.Windows.VerticalAlignment.Bottom
            });
            ComboBox Override = new ComboBox()
            {
                Items = { true, false }
            };

            stackPanel.Children.Add(Override);
            AddControlToNode(stackPanel);

            AddOutputPortToNode("SearchSet", typeof(object));

            //Help
            this.BottomComment.Text = "Applies color and transparency to selection. " +
                                      "Transparency is an integral from 0 to 100." +
                                      " If Override is set to true, " +
                                      "even viewpoints with saved visibility (sticky) will be updated";

            this.ShowHelpOnMouseOver = true;
        }
Esempio n. 11
0
 public SaveNWFile(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("NW Document", typeof(object));
     AddInputPortToNode("Path", typeof(object));
     AddOutputPortToNode("NW Document", typeof(object));
 }
        public ScriptingNode(VplControl.Core.VplControl hostCanvas)
            : base(hostCanvas)
        {
            scriptingControl = new ScriptingControl();


            scriptingControl.HighlightingComboBox.SelectionChanged += HighlightingComboBoxOnSelectionChanged;


            // Create new script File
            scriptingControl.CurrentFile = new CSharpScriptFile2();


            //scriptingControl.Height = 400;
            //scriptingControl.Width = 700;
            //scriptingControl.DockPanel.Height = 400;
            IsResizeable = true;

            //scriptingControl.StartCompilingEventHandler += StartCompilingEventHandler;

            scriptingControl.StartCSharpCompilingEventHandler += StartCSharpCompilation;
            scriptingControl.StartPythonCompilingEventHandler += StartPythonCompilation;

            AddControlToNode(scriptingControl);

            AddInputPortToNode("Input", typeof (object));

            AddOutputPortToNode("Output", typeof (object));
        }
Esempio n. 13
0
 public SetAppearanceBySelection(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("Selection", typeof(object));
     AddInputPortToNode("Color", typeof(System.Windows.Media.Color));
     AddOutputPortToNode("SearchSet", typeof(List <SelectionSet>));
 }
Esempio n. 14
0
 public GetItemAtIndex(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("List", typeof(List <object>));
     AddInputPortToNode("Index", typeof(int));
     AddOutputPortToNode("Result", typeof(object));
 }
Esempio n. 15
0
 public FilterMask(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("List", typeof(object));
     AddInputPortToNode("Mask", typeof(object));
     AddOutputPortToNode("In", typeof(object));
     AddOutputPortToNode("Output", typeof(object));
 }
Esempio n. 16
0
 public SetAPIPropertyValues(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("Input", typeof(object));
     AddInputPortToNode("Name", typeof(string));
     AddInputPortToNode("Value", typeof(object));
     AddOutputPortToNode("Output", typeof(object));
 }
Esempio n. 17
0
 public GetValueByCatProp(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("ModelItem", typeof(ModelItem));
     AddInputPortToNode("Category", typeof(string));
     AddInputPortToNode("Property", typeof(string));
     AddOutputPortToNode("Value", typeof(string));
 }
Esempio n. 18
0
 public SetAppearanceByProfile(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("File path", typeof(string));
     //Help
     this.BottomComment.Text  = "Applies color and transparency to SearchSets setted in json profile";
     this.ShowHelpOnMouseOver = true;
 }
Esempio n. 19
0
 public StringReplace(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("List", typeof(object));
     AddInputPortToNode("oldValue", typeof(object));
     AddInputPortToNode("newValue", typeof(object));
     AddOutputPortToNode("Output", typeof(object));
 }
Esempio n. 20
0
        public FileWorkSheets(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("FilePath", typeof(object));
            AddOutputPortToNode("Data", typeof(object));

            this.BottomComment.Text = "Get all the worksheets as a list " +
                                      "of strings";
        }
Esempio n. 21
0
        public GetAPIParameters(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("Input", typeof(object));

            AddOutputPortToNode("Output", typeof(object));

            this.BottomComment.Text = "Texto";
        }
Esempio n. 22
0
 public GetClashTest(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("NW Document", typeof(Document));
     AddOutputPortToNode("ClashTest", typeof(Object));
     //Help
     this.BottomComment.Text  = "Return clash tests in current document";
     this.ShowHelpOnMouseOver = true;
 }
Esempio n. 23
0
 public SetValueByCatProp(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("ModelItem", typeof(object), true);
     AddInputPortToNode("Category", typeof(object));
     AddInputPortToNode("Property", typeof(object));
     AddInputPortToNode("Value", typeof(object));
     AddOutputPortToNode("ModelItem", typeof(object));
 }
Esempio n. 24
0
        //TODO: read xml and convert to json profile
        #region Node class methods
        public GetJsonProfileFromXML(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("File path", typeof(string));

            //Help
            this.BottomComment.Text  = "Creates an Json version of the SearchSet sxml to be read by SetAppearanceByProfile";
            this.ShowHelpOnMouseOver = true;
        }
Esempio n. 25
0
 public GetViewpoints(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("Object", typeof(object), true);
     AddOutputPortToNode("Viewpoints", typeof(object));
     //Help
     this.ShowHelpOnMouseOver = true;
     this.BottomComment.Text  = "Return all viewpoints in current document";
 }
Esempio n. 26
0
 public RefreshAllClashTests(VplControl hostCanvas)
     : base(hostCanvas)
 {
     AddInputPortToNode("NW Document", typeof(object));
     AddOutputPortToNode("ClashTests", typeof(object));
     //Help
     this.BottomComment.Text  = "Refresh all clashes in current document";
     this.ShowHelpOnMouseOver = true;
 }
        private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
        {
            var filePath = @"../testdata/test.vplxml";

            if (File.Exists(filePath))
            {
                VplControl.OpenFile(filePath);
            }
        }
Esempio n. 28
0
 private void VplControl_Drop(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(typeof(RecordDragDropData)))
     {
         object data        = e.Data.GetData(typeof(RecordDragDropData));
         var    draggedNode = ((RecordDragDropData)data).Records;
         var    dataContext = ((ToolboxItem)((IList)draggedNode)[0]).Type;
         VplControl.CreateNode(dataContext, e.GetPosition(this).X, e.GetPosition(this).Y);
     }
 }
Esempio n. 29
0
        public CurrentDocument(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddOutputPortToNode("NW Document", typeof(object));
            AddInputPortToNode("NW Object", typeof(object));

            OutputPorts[0].Data = Autodesk.Navisworks.Api.Application.ActiveDocument;

            Calculate();
        }
Esempio n. 30
0
        public ListTranspose(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("List", typeof(object));
            AddOutputPortToNode("List", typeof(object));

            //Help
            this.ShowHelpOnMouseOver = true;
            this.BottomComment.Text  = "Transpose list of lists";
        }
Esempio n. 31
0
        public GetCurrentSelection(VplControl hostCanvas)
            : base(hostCanvas)
        {
            AddInputPortToNode("NW Document", typeof(Document));
            AddOutputPortToNode("Selection", typeof(object));

            //Help
            this.ShowHelpOnMouseOver = true;
            this.BottomComment.Text  = "Returns elements in current selection";
        }