<?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: PostableCommand SplitFace and SplitSurface in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/11211345#M33107</link>
    <description>&lt;P&gt;The next major release after Revit 2021 was Revit 2022.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 19:54:18 GMT</pubDate>
    <dc:creator>jeremy_tammik</dc:creator>
    <dc:date>2022-06-02T19:54:18Z</dc:date>
    <item>
      <title>PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9631907#M33101</link>
      <description>&lt;P&gt;Is there any reason that the command SplitFace and SplitSurface to not seem to run ? All other commands I try work fine. This is the code I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;class Update : IExternalCommand&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;public virtual Result Execute(ExternalCommandData commandData&lt;BR /&gt;, ref string message, ElementSet elements)&lt;BR /&gt;{&lt;BR /&gt;var cmdId = RevitCommandId.LookupPostableCommandId(PostableCommand.SplitFace);&lt;BR /&gt;new UIApplication(Rvt.Doc.Application).PostCommand(cmdId);&lt;BR /&gt;return Result.Succeeded;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jul 2020 10:45:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9631907#M33101</guid>
      <dc:creator>neillee</dc:creator>
      <dc:date>2020-07-13T10:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9634679#M33102</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Neil,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you for your query.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The code snippet you share above is incomplete.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;`Rvt` is not defined.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Maybe the way you create that `UIApplication` instance produces a weird result.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, I simplified and converted it into a real executable external command like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;  public Result Execute(
    ExternalCommandData commandData,
    ref string message,
    ElementSet elements )
  {
    UIApplication uiapp = commandData.Application;

    var cmdId = RevitCommandId.LookupPostableCommandId( 
      PostableCommand.SplitFace );

    uiapp.PostCommand( cmdId );

    return Result.Succeeded;
  }&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That does not seem to launch the Split Face command either.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have asked the development team for you whether there is a reason for this, and what the expected behaviour might be.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 14:28:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9634679#M33102</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-07-14T14:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9635975#M33103</link>
      <description>&lt;P&gt;Are you running it when in a view that allows splitface commands?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 02:28:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9635975#M33103</guid>
      <dc:creator>Sean_Page</dc:creator>
      <dc:date>2020-07-15T02:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9636358#M33104</link>
      <description>&lt;P&gt;I tested and confirmed. Manually, it works, and the PostCommand in the same view does nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The development team confirmed something weird in past releases Revit 2019 and 2020, and confirmed that it works in a future major release of Revit, the current development release.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the problem is presumably real.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 09:06:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9636358#M33104</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-07-15T09:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9639150#M33105</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The development team confirm our findings:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As said, a macro running SplitFace via `PostCommand` does work in the current development build.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The list of PostableCommands was cleaned up to match the current UI.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The split face command id was wrong before the cleanup.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The SplitFace id in the PostableCommand list changed from 35732 to 33689 in May 2020, which is a correct change.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This means that it never worked in Revit 2021 and before (I confirmed) and now it works in the next major release of Revit.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Question: So, perhaps in earlier versions it could be faked with a cast?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer: Unfortunately, the faked with a cast won't work as we validate the input with the `Enum.IsDefined` method.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 14:18:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9639150#M33105</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2020-07-16T14:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9640733#M33106</link>
      <description>&lt;P&gt;How would I know when that is ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would that be a hotfix, Revit 2021 R2 or Revit 2022 ?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 09:53:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/9640733#M33106</guid>
      <dc:creator>neillee</dc:creator>
      <dc:date>2020-07-17T09:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: PostableCommand SplitFace and SplitSurface</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/11211345#M33107</link>
      <description>&lt;P&gt;The next major release after Revit 2021 was Revit 2022.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 19:54:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/postablecommand-splitface-and-splitsurface/m-p/11211345#M33107</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-06-02T19:54:18Z</dc:date>
    </item>
  </channel>
</rss>

