Coordinate > Clash Results
Show in Revit
Sends the selected elements to Revit, where the Playground Link button for pyRevit selects and zooms to them.
Status
Untested Never executed inside Navisworks. Passed the headless checks only.
The public ask
No public source is on record for this tool.
Installs with
Show in Revit sits in a stack, so installing it also installs:
Events it listens to
None. It runs only when you click it.
Files
Paths are relative to the Playground.extension folder.
Coordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/bundle.yamlCoordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/icon.dark.pngCoordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/icon.pngCoordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/icon.small.dark.pngCoordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/icon.small.pngCoordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Show in Revit, tick it and click Install.
- The whole extension. Download
Playground.extension.zip, unzip it, put thePlayground.extensionfolder in%APPDATA%\pyNavis\extensions\, and click pyNavis > Reload. Show in Revit is on the Coordinate tab, Clash Results panel.
You need pyNavis 1.3.0 or later.
Tried it? Tell us whether it worked or not. That report is what moves a tool up the status ladder.
ReportSource
The tool's own files, word for word as published in pynavis/Playground. Paths are relative to the Playground.extension folder.
script.py
The script that runs on a click.
Coordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/script.py View on GitHub"""Sends the selected elements to Revit, where the Playground Link button for pyRevit selects them."""
from pynavis import toast
from namo import revitlink
from namo import clashset_common as common
def run():
elements, skipped = revitlink.selected_elements()
if not elements:
if skipped:
toast.info('The selection has no Revit elements',
'Select elements from models exported from Revit, then click again.')
else:
toast.info('Nothing selected', 'Select the elements to show in Revit, then click again.')
return
try:
revitlink.send_to_revit(elements)
except (IOError, OSError) as error:
toast.error('Could not write the link file', str(error))
return
files = sorted(set(e['file'] for e in elements if e['file']))
detail = 'In Revit, open %s and click Playground > Show from Navisworks.' % (
revitlink.short_list(files, 2) if files else 'the model')
if skipped:
detail = '%s without Revit IDs left out. %s' % (common.plural(skipped, 'item'), detail)
toast.success('Sent %s to Revit' % common.plural(len(elements), 'element'), detail)
run()
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.clashset_commonSmall things every Clash Setup and Clash Results tool shares.namo.revitlinkRevit Link: hand elements between Navisworks and Revit through two small JSON files.
bundle.yaml
The bundle contract: the keys pyNavis reads for this tool.
Coordinate.tab/Clash_Results.panel/Revit_Link.stack/Show_in_Revit.pushbutton/bundle.yaml View on GitHubtitle: Show in Revit
tooltip: Sends the selected elements to Revit, where the Playground Link button for pyRevit selects and zooms to them.
context: selection