public ListFlatten(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("List", typeof(object)); AddInputPortToNode("Level", typeof(object)); AddOutputPortToNode("List", typeof(object)); }
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"; }
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)); }
public RefreshClashTests(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("Tests", typeof(object)); AddOutputPortToNode("Clash Tests", typeof(object)); }
public StringContains(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("List", typeof(object)); AddInputPortToNode("String", typeof(object)); AddOutputPortToNode("Output", typeof(object)); }
public RenameViewpoints(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("Viewpoints", typeof(object)); AddInputPortToNode("Name", typeof(string)); AddOutputPortToNode("Output", typeof(object)); }
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; }
public FileFromPath(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("FilePath", typeof(object)); AddOutputPortToNode("File", typeof(object)); this.BottomComment.Text = "Creates File object from given file path."; }
public GetElementsInClash(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("ClashTest", typeof(object)); AddOutputPortToNode("SelectionA", typeof(object)); AddOutputPortToNode("SelectionB", typeof(object)); }
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; }
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)); }
public SetAppearanceBySelection(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("Selection", typeof(object)); AddInputPortToNode("Color", typeof(System.Windows.Media.Color)); AddOutputPortToNode("SearchSet", typeof(List <SelectionSet>)); }
public GetItemAtIndex(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("List", typeof(List <object>)); AddInputPortToNode("Index", typeof(int)); AddOutputPortToNode("Result", typeof(object)); }
public FilterMask(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("List", typeof(object)); AddInputPortToNode("Mask", typeof(object)); AddOutputPortToNode("In", typeof(object)); AddOutputPortToNode("Output", typeof(object)); }
public SetAPIPropertyValues(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("Input", typeof(object)); AddInputPortToNode("Name", typeof(string)); AddInputPortToNode("Value", typeof(object)); AddOutputPortToNode("Output", typeof(object)); }
public GetValueByCatProp(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("ModelItem", typeof(ModelItem)); AddInputPortToNode("Category", typeof(string)); AddInputPortToNode("Property", typeof(string)); AddOutputPortToNode("Value", typeof(string)); }
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; }
public StringReplace(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("List", typeof(object)); AddInputPortToNode("oldValue", typeof(object)); AddInputPortToNode("newValue", typeof(object)); AddOutputPortToNode("Output", typeof(object)); }
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"; }
public GetAPIParameters(VplControl hostCanvas) : base(hostCanvas) { AddInputPortToNode("Input", typeof(object)); AddOutputPortToNode("Output", typeof(object)); this.BottomComment.Text = "Texto"; }
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; }
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)); }
//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; }
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"; }
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); } }
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); } }
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(); }
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"; }
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"; }