# Rhythm: PostableCommand.CloseHiddenWindows gone?

**URL:** <https://forum.dynamobim.com/t/rhythm-postablecommand-closehiddenwindows-gone/26478>\
**Category:** Packages\
**Created:** [September 26, 2018, 6:37pm UTC](https://forum.dynamobim.com/t/rhythm-postablecommand-closehiddenwindows-gone/26478 "2018-09-26T18:37:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdeardorff](https://avatars.discourse-cdn.com/v4/letter/r/e19adc/32.png) [@rdeardorff](https://forum.dynamobim.com/u/rdeardorff)\
**Post date:** [September 26, 2018, 6:37pm UTC](https://forum.dynamobim.com/t/rhythm-postablecommand-closehiddenwindows-gone/26478/1 "2018-09-26T18:37:54Z")

</div>

@john_pierson

I tried looking through your github page but can’t find what I am looking for. Has this node been deprecated? If so, is there a replacement?

---

<div class="post-metadata">

**Author:** ![interactiverendering](https://avatars.discourse-cdn.com/v4/letter/i/db5fbb/32.png) [@interactiverendering](https://forum.dynamobim.com/u/interactiverendering)\
**Post date:** [September 26, 2018, 6:49pm UTC](https://forum.dynamobim.com/t/rhythm-postablecommand-closehiddenwindows-gone/26478/2 "2018-09-26T18:49:54Z")

</div>

> [@Create View Template from View?](https://forum.dynamobim.com/t/create-view-template-from-view/14676/2):
>
> That’s a “postable command” in Revit. Which means you are essentially sending that keypress / command to the revit application. So all it will really do is this, But here is the python if you want it, import clr clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager clr.AddReference("RevitAPI") from Autodesk.Revit.DB import \* clr.AddReferenc…

could help and you can download also the previous version of the package

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [September 26, 2018, 6:56pm UTC](https://forum.dynamobim.com/t/rhythm-postablecommand-closehiddenwindows-gone/26478/3 "2018-09-26T18:56:14Z")

</div>

> [@interactiverendering](#):
>
> could help and you can download also the previous package

You can download the old package and extract the Python script. Although, I would advise being on the latest version of Rhythm if possible.

I dropped that node for a few reasons,

1. It’s a `.DYF` custom node. I am working on removing these from the package completely and being 100% ZeroTouch C# nodes.

2. The method changed in the Revit 2019 API from `PostableCommand.CloseHiddenWindows` to `PostableCommand.CloseInactiveViews`. So rather than rebuild the logic, I dropped it. 😬

That being said, this Python script should work for you.

```
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager

app = DocumentManager.Instance.CurrentUIApplication.Application
uiapp = DocumentManager.Instance.CurrentUIApplication

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *

# output a result
output = []

# find out version number of Revit
if int(app.VersionNumber) > 2017: fullVersion = app.SubVersionNumber
else: fullVersion = str(app.VersionNumber)

# if it is 2019, we need to use the new method
if fullVersion.Contains("2019"):
	pCmd = RevitCommandId.LookupPostableCommandId(PostableCommand.CloseInactiveViews)
# other versions use the old method
else:
	pCmd = RevitCommandId.LookupPostableCommandId(PostableCommand.CloseHiddenWindows)

# runs if true is fed into the node
if IN[0] == True:
	uiapp.PostCommand(pCmd)
	output = True
else :
	output = 'set runit to true'
OUT = output

```

If there is enough need/interest for the node I can add it back to Rhythm as a ZeroTouch implementation.
