<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Displaying Properties in Dockpane in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8512445#M45227</link>
    <description>&lt;P&gt;Happy new year.Sorry for the late reply as I'm busy with some other project in autocad. Now again coming to revit I have studied all the article related to external events.Help me with some sample code solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Palanivelan&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jan 2019 09:17:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-01-10T09:17:39Z</dc:date>
    <item>
      <title>Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8490301#M45223</link>
      <description>&lt;P&gt;I have displayed the dockpane in revit using external command and after dispalying dockpane Im trying to bind the tyep and instance properties in dockpane I have kept tabcontrol in dockpane.But the expection occurs while selecting the element active view is no graphical so pickobject cannot be used..Help me to bind the properties data as Im new to revit api..Thanks in advance.. Here is my code..and screenshot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;namespace DockableDialog&lt;BR /&gt;{&lt;BR /&gt; [Transaction(TransactionMode.Manual)]&lt;BR /&gt; public class Ribbon : IExternalApplication&lt;BR /&gt; {&lt;BR /&gt; public Result OnStartup( UIControlledApplication a )&lt;BR /&gt; {&lt;BR /&gt; a.CreateRibbonTab( "DOCK" );&lt;BR /&gt; RibbonPanel DockPanel = a.CreateRibbonPanel( "DOCK", "DOCK" );&lt;BR /&gt; string path = Assembly.GetExecutingAssembly().Location;&lt;BR /&gt; &lt;BR /&gt; PushButtonData pushButtonRegisterDockableWindow = new PushButtonData( "RegisterDockableWindow", "RegisterDockableWindow", path, "DockableDialog.RegisterDockableWindow" );&lt;BR /&gt; pushButtonRegisterDockableWindow.LargeImage = GetImage( Resources.green.GetHbitmap() );&lt;BR /&gt; pushButtonRegisterDockableWindow.AvailabilityClassName = "DockableDialog.AvailabilityNoOpenDocument";&lt;BR /&gt; PushButtonData pushButtonShowDockableWindow = new PushButtonData( "Show DockableWindow", "Show DockableWindow", path, "DockableDialog.ShowDockableWindow" );&lt;BR /&gt; pushButtonShowDockableWindow.LargeImage = GetImage( Resources.red.GetHbitmap() );&lt;BR /&gt; PushButtonData pushButtonHideDockableWindow = new PushButtonData( "Hide DockableWindow", "Hide DockableWindow", path, "DockableDialog.HideDockableWindow" );&lt;BR /&gt; pushButtonHideDockableWindow.LargeImage = GetImage( Resources.orange.GetHbitmap() );&lt;BR /&gt; PushButtonData pushButtonShowProperties = new PushButtonData("Show Properties", "Show Properties", path, "DockableDialog.ShowProperties");&lt;BR /&gt; pushButtonShowProperties.LargeImage = GetImage(Resources.green.GetHbitmap());&lt;BR /&gt; &lt;BR /&gt; RibbonItem ri1 = DockPanel.AddItem( pushButtonRegisterDockableWindow );&lt;BR /&gt; RibbonItem ri2 = DockPanel.AddItem( pushButtonShowDockableWindow );&lt;BR /&gt; RibbonItem ri3 = DockPanel.AddItem( pushButtonHideDockableWindow );&lt;BR /&gt; RibbonItem ri4 = DockPanel.AddItem(pushButtonShowProperties);&lt;/P&gt;
&lt;P&gt;return Result.Succeeded;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;public Result OnShutdown( UIControlledApplication a )&lt;BR /&gt; {&lt;BR /&gt; return Result.Succeeded;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;private System.Windows.Media.Imaging.BitmapSource GetImage( IntPtr bm )&lt;BR /&gt; {&lt;BR /&gt; System.Windows.Media.Imaging.BitmapSource bmSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( bm,IntPtr.Zero,System.Windows.Int32Rect.Empty,System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions() );&lt;/P&gt;
&lt;P&gt;return bmSource;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; public class AvailabilityNoOpenDocument : IExternalCommandAvailability&lt;BR /&gt; {&lt;BR /&gt; public bool IsCommandAvailable(UIApplication a, CategorySet b)&lt;BR /&gt; {&lt;BR /&gt; if (a.ActiveUIDocument == null)&lt;BR /&gt; {&lt;BR /&gt; return true;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; return true;&lt;/P&gt;
&lt;P&gt;//if (a.Application.Product == ProductType.Structure) return false;&lt;BR /&gt; //if (a.Application.Product == ProductType.MEP) return false;&lt;/P&gt;
&lt;P&gt;//if (b.IsEmpty) return true;&lt;/P&gt;
&lt;P&gt;//Categories allCats = a.ActiveUIDocument.Document.Settings.Categories;&lt;/P&gt;
&lt;P&gt;//Category cat = allCats.get_Item(BuiltInCategory.OST_Walls);&lt;BR /&gt; //if (b.Contains(cat)) return true;&lt;/P&gt;
&lt;P&gt;//cat = allCats.get_Item(BuiltInCategory.OST_Windows);&lt;BR /&gt; //if (b.Contains(cat)) return true;&lt;/P&gt;
&lt;P&gt;//cat = allCats.get_Item(BuiltInCategory.OST_Stairs);&lt;BR /&gt; //if (b.Contains(cat)) return true;&lt;/P&gt;
&lt;P&gt;//return false;&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; /// &amp;lt;summary&amp;gt;&lt;BR /&gt; /// Register your dockable dialog&lt;BR /&gt; /// &amp;lt;/summary&amp;gt;&lt;BR /&gt; [Transaction( TransactionMode.Manual )]&lt;BR /&gt; public class RegisterDockableWindow : IExternalCommand&lt;BR /&gt; {&lt;BR /&gt; MainPage m_MyDockableWindow = null;&lt;/P&gt;
&lt;P&gt;public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements )&lt;BR /&gt; {&lt;BR /&gt; DockablePaneProviderData data = new DockablePaneProviderData();&lt;BR /&gt; MainPage MainDockableWindow = new MainPage();&lt;BR /&gt; m_MyDockableWindow = MainDockableWindow;&lt;BR /&gt; //MainDockableWindow.SetupDockablePane(me);&lt;BR /&gt; data.FrameworkElement = MainDockableWindow as System.Windows.FrameworkElement;&lt;BR /&gt; data.InitialState = new DockablePaneState();&lt;BR /&gt; data.InitialState.DockPosition = DockPosition.Tabbed;&lt;BR /&gt; &lt;BR /&gt; data.InitialState.TabBehind = DockablePanes.BuiltInDockablePanes.ProjectBrowser;&lt;BR /&gt; DockablePaneId dpid = new DockablePaneId(new Guid("{D7C963CE-B7CA-426A-8D51-6E8254D21157}"));&lt;/P&gt;
&lt;P&gt;// DockablePaneId dpid = new DockablePaneId(Guid.NewGuid());&lt;/P&gt;
&lt;P&gt;commandData.Application.RegisterDockablePane( dpid, "AEC Dockable Window", MainDockableWindow as IDockablePaneProvider );&lt;BR /&gt; commandData.Application.ViewActivated += new EventHandler&amp;lt;ViewActivatedEventArgs&amp;gt;( Application_ViewActivated );&lt;BR /&gt; return Result.Succeeded;&lt;BR /&gt; }&lt;BR /&gt; private void Application_ViewActivated( object sender, ViewActivatedEventArgs e )&lt;BR /&gt; {&lt;BR /&gt; m_MyDockableWindow.lblProjectName.Content = e.Document.ProjectInformation.Name;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;[Transaction( TransactionMode.ReadOnly )]&lt;BR /&gt; public class ShowDockableWindow : IExternalCommand&lt;BR /&gt; {&lt;BR /&gt; public Result Execute(ExternalCommandData commandData,ref string message,ElementSet elements )&lt;BR /&gt; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DockablePaneId dpid = new DockablePaneId(new Guid("{D7C963CE-B7CA-426A-8D51-6E8254D21157}"));&lt;BR /&gt; //DockablePaneId dpid = new DockablePaneId(Guid.NewGuid());&lt;BR /&gt; DockablePane dp = commandData.Application.GetDockablePane(dpid);&lt;BR /&gt; dp.Show();&lt;/P&gt;
&lt;P&gt;return Result.Succeeded;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;[Transaction(TransactionMode.ReadOnly)]&lt;BR /&gt; public class ShowProperties : IExternalCommand&lt;BR /&gt; {&lt;BR /&gt; public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)&lt;BR /&gt; {&lt;BR /&gt; UIApplication uiapp = commandData.Application;&lt;BR /&gt; UIDocument uiDoc = uiapp.ActiveUIDocument;&lt;BR /&gt; Document doc = uiDoc.Document;&lt;BR /&gt; Reference pickedRef = null;&lt;BR /&gt; Selection selobj = uiapp.ActiveUIDocument.Selection;&lt;BR /&gt; pickedRef = selobj.PickObject(ObjectType.Element, "Select");&lt;BR /&gt; Element element = doc.GetElement(pickedRef);&lt;BR /&gt; FamilyInstance fmlInst = element as FamilyInstance;&lt;BR /&gt; ElementId id = element.GetTypeId();&lt;BR /&gt; ElementType type = doc.GetElement(id) as ElementType;&lt;BR /&gt; var elemen = doc.GetElement(element.GetTypeId());&lt;BR /&gt; MainPage pageDisplay = new MainPage();&lt;BR /&gt; if (fmlInst == null)&lt;BR /&gt; {&lt;BR /&gt; var t = type.Parameters;&lt;BR /&gt; var wallParam = element.Parameters;&lt;BR /&gt; List&amp;lt;PropertiesDetails&amp;gt; Parameters = new List&amp;lt;PropertiesDetails&amp;gt;();&lt;BR /&gt; List&amp;lt;Details&amp;gt; tparameters = new List&amp;lt;Details&amp;gt;();&lt;/P&gt;
&lt;P&gt;foreach (Parameter wallPara in t)&lt;BR /&gt; {&lt;BR /&gt; Details param = new Details();&lt;BR /&gt; var parameterName = wallPara.Definition.Name;&lt;BR /&gt; string parameterNam = wallPara.AsValueString();&lt;BR /&gt; param.name = parameterName;&lt;BR /&gt; param.nam = parameterNam;&lt;BR /&gt; tparameters.Add(param);&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; pageDisplay.Assign(tparameters);&lt;/P&gt;
&lt;P&gt;foreach (Parameter wallParameters in wallParam)&lt;BR /&gt; {&lt;BR /&gt; PropertiesDetails paramdetails = new PropertiesDetails();&lt;BR /&gt; var name = wallParameters.Definition.Name;&lt;BR /&gt; string nam = wallParameters.AsValueString();&lt;BR /&gt; paramdetails.PropertyName = name;&lt;BR /&gt; paramdetails.PropertyValue = nam;&lt;BR /&gt; Parameters.Add(paramdetails);&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; pageDisplay.Assign1(Parameters);&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;else&lt;BR /&gt; {&lt;BR /&gt; var symbol = doc.GetElement(id) as FamilySymbol;&lt;/P&gt;
&lt;P&gt;var param = element.Parameters;&lt;/P&gt;
&lt;P&gt;List&amp;lt;Details&amp;gt; tparamdetails1 = new List&amp;lt;Details&amp;gt;();&lt;BR /&gt; List&amp;lt;PropertiesDetails&amp;gt; familyparameters = new List&amp;lt;PropertiesDetails&amp;gt;();&lt;BR /&gt; /// var c = element.symbol;&lt;/P&gt;
&lt;P&gt;foreach (Parameter tparam in symbol.Parameters)&lt;BR /&gt; {&lt;BR /&gt; Details tparamdetails = new Details();&lt;BR /&gt; var name = tparam.Definition.Name;&lt;BR /&gt; string nam = tparam.AsValueString();&lt;/P&gt;
&lt;P&gt;tparamdetails.name = name;&lt;BR /&gt; tparamdetails.nam = nam;&lt;BR /&gt; tparamdetails1.Add(tparamdetails);&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; pageDisplay.Assign(tparamdetails1);&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; foreach (Parameter finstparameter in param)&lt;BR /&gt; {&lt;BR /&gt; PropertiesDetails paramdetails = new PropertiesDetails();&lt;/P&gt;
&lt;P&gt;var name = finstparameter.Definition.Name;&lt;BR /&gt; string nam = finstparameter.AsValueString();&lt;/P&gt;
&lt;P&gt;paramdetails.PropertyName = name;&lt;BR /&gt; paramdetails.PropertyValue = nam;&lt;BR /&gt; familyparameters.Add(paramdetails);&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt; //pageDisplay.Assign1(familyparameters);&lt;BR /&gt; //DockablePaneId dpid = new DockablePaneId(new Guid("{D7C963CE-B7CA-426A-8D51-6E8254D21157}"));&lt;/P&gt;
&lt;P&gt;////DockablePaneId dpid = new DockablePaneId(Guid.NewGuid());&lt;BR /&gt; //DockablePane dp = commandData.Application.GetDockablePane(dpid);&lt;BR /&gt; //dp.Show();&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; return Result.Succeeded;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;public class Details&lt;BR /&gt; {&lt;BR /&gt; public string name { get; set; }&lt;BR /&gt; public string nam { get; set; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;public class PropertiesDetails&lt;BR /&gt; {&lt;BR /&gt; public string PropertyName { get; set; }&lt;BR /&gt; public string PropertyValue { get; set; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;[Transaction( TransactionMode.ReadOnly )]&lt;BR /&gt; public class HideDockableWindow : IExternalCommand&lt;BR /&gt; {&lt;BR /&gt; public Result Execute( ExternalCommandData commandData, ref string message, ElementSet elements )&lt;BR /&gt; {&lt;BR /&gt; DockablePaneId dpid = new DockablePaneId(new Guid("{D7C963CE-B7CA-426A-8D51-6E8254D21157}"));&lt;BR /&gt; // DockablePaneId dpid = new DockablePaneId(Guid.NewGuid());&lt;BR /&gt; DockablePane dp = commandData.Application.GetDockablePane( dpid );&lt;BR /&gt; dp.Hide();&lt;BR /&gt; return Result.Succeeded;&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;xaml -&lt;/P&gt;
&lt;P&gt;&amp;lt;Page x:Class="DockableDialog.Forms.MainPage"&lt;BR /&gt; xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"&lt;BR /&gt; xmlns="&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml/presentation" target="_blank"&gt;http://schemas.microsoft.com/winfx/2006/xaml/presentation&lt;/A&gt;"&lt;BR /&gt; xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"&lt;BR /&gt; xmlns:x="&lt;A href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank"&gt;http://schemas.microsoft.com/winfx/2006/xaml&lt;/A&gt;"&lt;BR /&gt; xmlns:System="clr-namespace:System;assembly=mscorlib"&lt;BR /&gt; Title="Dockable Dialogs" Height="600" Width="600"&lt;BR /&gt; x:Name="DockableDialogs" Background="LightGray" Loaded="DockableDialogs_Loaded"&amp;gt;&lt;BR /&gt; &amp;lt;Grid&amp;gt;&lt;BR /&gt; &amp;lt;!--&amp;lt;TabControl&amp;gt;&lt;BR /&gt; &amp;lt;TabItem Header="Type Parameter"&amp;gt;&lt;BR /&gt; &amp;lt;Label Content="Content goes here..." /&amp;gt;&lt;BR /&gt; &amp;lt;/TabItem&amp;gt;&lt;BR /&gt; &amp;lt;TabItem Header="InstanceParameter" /&amp;gt;&lt;BR /&gt; &amp;lt;TabItem Header="Details" /&amp;gt;&lt;BR /&gt; &amp;lt;/TabControl&amp;gt;--&amp;gt;&lt;BR /&gt; &amp;lt;DockPanel Height="500" Width="550"&amp;gt;&lt;BR /&gt; &amp;lt;TabControl Name="Sample" Width="540"&amp;gt;&lt;BR /&gt; &amp;lt;TabItem Header="Type Parameter"&amp;gt;&lt;BR /&gt; &amp;lt;DataGrid Name="DataGrid" AutoGenerateColumns="False" Margin="10,10,10,10" HorizontalAlignment="Left" Width="500" &amp;gt;&lt;BR /&gt; &amp;lt;DataGrid.Columns&amp;gt;&lt;BR /&gt; &amp;lt;DataGridTextColumn Header="Parameter" Width="300" Binding="{Binding name}" /&amp;gt;&lt;BR /&gt; &amp;lt;DataGridTextColumn Header="Value" Width="200" Binding="{Binding nam}" /&amp;gt;&lt;BR /&gt; &amp;lt;/DataGrid.Columns&amp;gt;&lt;BR /&gt; &amp;lt;/DataGrid&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/TabItem&amp;gt;&lt;BR /&gt; &amp;lt;TabItem Header="Instance Parameter" &amp;gt;&lt;BR /&gt; &amp;lt;DataGrid Name="DataGrids" AutoGenerateColumns="False" Margin="10,10,-20,10" HorizontalAlignment="Left" Width="300" &amp;gt;&lt;BR /&gt; &amp;lt;DataGrid.Columns&amp;gt;&lt;BR /&gt; &amp;lt;DataGridTextColumn Header="Parameter" Width="150" Binding="{Binding PropertyName}" /&amp;gt;&lt;BR /&gt; &amp;lt;DataGridTextColumn Header="Value" Width="150" Binding="{Binding PropertyValue}" /&amp;gt;&lt;BR /&gt; &amp;lt;/DataGrid.Columns&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/DataGrid&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/TabItem&amp;gt;&lt;BR /&gt; &amp;lt;/TabControl&amp;gt;&lt;BR /&gt; &amp;lt;/DockPanel&amp;gt;&lt;BR /&gt; &amp;lt;Label Content="Label" Height="26" HorizontalAlignment="Left" Margin="25,24,0,0" Name="lblProjectName" VerticalAlignment="Top" Width="176" /&amp;gt;&lt;BR /&gt; &amp;lt;/Grid&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/Page&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;xaml.cs-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;namespace DockableDialog.Forms&lt;BR /&gt;{&lt;BR /&gt; &lt;BR /&gt; public partial class MainPage : Page, Autodesk.Revit.UI.IDockablePaneProvider&lt;BR /&gt; {&lt;BR /&gt; public static MainPage myMainWindow;&lt;BR /&gt; public MainPage()&lt;BR /&gt; {&lt;BR /&gt; InitializeComponent();&lt;BR /&gt; myMainWindow = this;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;public void Assign(List&amp;lt;Details&amp;gt; properties)&lt;BR /&gt; {&lt;BR /&gt; DataGrid.ItemsSource = properties;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;public void Assign1(List&amp;lt;PropertiesDetails&amp;gt; properties)&lt;BR /&gt; {&lt;BR /&gt; DataGrids.ItemsSource = properties;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; public void SetupDockablePane(Autodesk.Revit.UI.DockablePaneProviderData data)&lt;BR /&gt; {&lt;BR /&gt; data.FrameworkElement = this as FrameworkElement;&lt;BR /&gt; data.InitialState = new Autodesk.Revit.UI.DockablePaneState();&lt;BR /&gt; data.InitialState.DockPosition = DockPosition.Tabbed;&lt;BR /&gt; &lt;BR /&gt; data.InitialState.TabBehind = Autodesk.Revit.UI.DockablePanes.BuiltInDockablePanes.ProjectBrowser;&lt;BR /&gt; &lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;private void DockableDialogs_Loaded(object sender, RoutedEventArgs e)&lt;BR /&gt; {&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 07:20:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8490301#M45223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-28T07:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8490502#M45224</link>
      <description>&lt;P&gt;In general, in a dockable panel, you are in a modeless context. Therefore, you&amp;nbsp;are not in a valid Revit API context and lack access to the Revit API, let alone the active document. You can work around that by implementing an external event to obtain a valid Revit API context and communicate from the dockable panel back to the Revit API:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 11:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8490502#M45224</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-12-28T11:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8493607#M45225</link>
      <description>&lt;P&gt;Hi jeremy,&lt;/P&gt;
&lt;P&gt;Please help me with which external event to use as I am new to revit I have no idea of external events.Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 10:41:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8493607#M45225</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-31T10:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8493608#M45226</link>
      <description>&lt;P&gt;Dear Lallu,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please read all there is to know about external events in the discussions I already pointed out:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.28&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Those discussion include just about all I or anyone else knows about this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards and Happy New Year!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 10:44:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8493608#M45226</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2018-12-31T10:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8512445#M45227</link>
      <description>&lt;P&gt;Happy new year.Sorry for the late reply as I'm busy with some other project in autocad. Now again coming to revit I have studied all the article related to external events.Help me with some sample code solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Palanivelan&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 09:17:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8512445#M45227</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-10T09:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8512804#M45228</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the problem may be that the focus is lost:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/bring-focus-to-graphical-view/m-p/8245732#M33222" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/bring-focus-to-graphical-view/m-p/8245732#M33222&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 12:03:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/8512804#M45228</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2019-01-10T12:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/12182749#M45229</link>
      <description>&lt;P&gt;Hola,Llegaste a una solucion?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;Hi, did you find a solution?&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2023 19:47:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/12182749#M45229</guid>
      <dc:creator>reylorente1</dc:creator>
      <dc:date>2023-08-19T19:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying Properties in Dockpane</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/12182814#M45230</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Type" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1255446iB080048F1B7F3DBF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura de pantalla 2023-08-19 235819.png" alt="Type" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Type&lt;/span&gt;&lt;/span&gt;Es tEEEEEEEEEEEEEEqqqqqq&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Instance" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1255447iA5F7A39EE2123312/image-size/large?v=v2&amp;amp;px=999" role="button" title="Captura de pantalla 2023-08-19 235840.png" alt="Instance" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Instance&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Aug 2023 21:02:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/displaying-properties-in-dockpane/m-p/12182814#M45230</guid>
      <dc:creator>reylorente1</dc:creator>
      <dc:date>2023-08-19T21:02:40Z</dc:date>
    </item>
  </channel>
</rss>

