<?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: Unable to select Object from the form in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161898#M10292</link>
    <description>&lt;P&gt;The alternative depending on the complexity of your form would be to close the form after saving it's state carry out the selection operation and then reshow the form with values reinstated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Save values from form&lt;/LI&gt;&lt;LI&gt;Call Form.Close&lt;/LI&gt;&lt;LI&gt;Carry out Revit selection operation&lt;/LI&gt;&lt;LI&gt;Create new Form adding values back from (1)&lt;/LI&gt;&lt;LI&gt;ShowDialog&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a simple modal dialogue this is often more straightforward than external event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your form is modeless then external event is the way to do.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Aug 2023 11:42:59 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2023-08-10T11:42:59Z</dc:date>
    <item>
      <title>Unable to select Object from the form</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161705#M10290</link>
      <description>&lt;P&gt;Unable to select Object from "Click Button" in the form.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void DrawBySelect_Click(object sender, EventArgs e)
    {
      IsolatedFootingDGVData = IsolatedFootingDGV;
      var sel = uiDoc.Selection;
      this.Hide();

      var selectionFilter = new KJF.FamilySelectionFilter(
        doc, BuiltInCategory.OST_StructuralFoundation, "Isolated RCC Footing 2022_BT");

      var elem = doc.GetElement(
       sel.PickObject(ObjectType.Element, selectionFilter)) as FamilyInstance;

      var design_ID = elem.get_Parameter(BuiltInParameter.ELEM_TYPE_PARAM).AsValueString();

      var row = IsolatedFootingDGV.Rows.Cast&amp;lt;DataGridViewRow&amp;gt;()
        .Where(r =&amp;gt; r.Cells["DesignID"].Value.ToString().Equals(design_ID)).First();
      this.Show();
      
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 08:54:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161705#M10290</guid>
      <dc:creator>Arciviz</dc:creator>
      <dc:date>2023-08-10T08:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to select Object from the form</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161878#M10291</link>
      <description>&lt;P&gt;Resolved&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/call-revit-s-api-from-external-thread/td-p/5941308" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/call-revit-s-api-from-external-thread/td-p/5941308&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 10:37:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161878#M10291</guid>
      <dc:creator>Arciviz</dc:creator>
      <dc:date>2023-08-10T10:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to select Object from the form</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161898#M10292</link>
      <description>&lt;P&gt;The alternative depending on the complexity of your form would be to close the form after saving it's state carry out the selection operation and then reshow the form with values reinstated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Save values from form&lt;/LI&gt;&lt;LI&gt;Call Form.Close&lt;/LI&gt;&lt;LI&gt;Carry out Revit selection operation&lt;/LI&gt;&lt;LI&gt;Create new Form adding values back from (1)&lt;/LI&gt;&lt;LI&gt;ShowDialog&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a simple modal dialogue this is often more straightforward than external event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your form is modeless then external event is the way to do.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 11:42:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/unable-to-select-object-from-the-form/m-p/12161898#M10292</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2023-08-10T11:42:59Z</dc:date>
    </item>
  </channel>
</rss>

