public SetParameter(SetParameterViewModel viewModel) { InitializeComponent(); _viewModel = viewModel; TopMost = true; CbbParameter.DataSource = _viewModel.AllParameterName; _viewModel.SelectedParameter = CbbParameter.SelectedItem.ToString(); _myEvent = new SetParameterEvent(); _myExternalEvent = ExternalEvent.Create(_myEvent); }
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; Document doc = uidoc.Document; SetParameterViewModel ViewModel = new SetParameterViewModel(uidoc); SetParameter window = new SetParameter(ViewModel); window.Show(); return(Result.Succeeded); }