
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have a windows WPF which I’d like to populate with some parameters from the titleblock which is selected from a ComboBox. I’m using a selectionChangedEventArgs to manage the selection. When an item is selected from the ComboBox the parameters from the titleblock selected should update. My problem is that I need to check the FamilySymbol which is selected and retrieve the FamilySymbol's parameters. I have built the class and methods to do this. The problem is that I need the “Document doc” which I can’t seem to access without “ExternalCommandData”. Is it possible to make a method which would return the Document? Or maybe something simple such as “Autodesk.Revit.DB.Document doc;”?
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboBox cmb = sender as ComboBox; object selectedValue = cmb.SelectedItem; selectedTitleblock = selectedValue.ToString(); SchemaAndStoreData schemaAndStoreData = new SchemaAndStoreData(); Titleblock tb = new Titleblock();
//This is where I need the Document doc.
tb.TitleblockFamilySymbolList(doc); FamilySymbol titleblock = tb.getFamilySymbol(selectedTitleblock); schemaAndStoreData.RetrieveData(titleblock); }
Solved! Go to Solution.