Views > Viewpoints
Where Am I
One popup with where the camera is: the saved viewpoint it is on, eye coordinates, compass heading and pitch, nearest level and grid intersection, lens, section, models and selection. Copy puts it on the clipboard.
Status
Launched Ran inside Navisworks at least once with no error logged; nobody checked the result yet.
Ran headless under pynavis run against a sample model; no selection: ran to the end (wrote output); result not checked by a person.
The public ask
No public source is on record for this tool.
Events it listens to
None. It runs only when you click it.
Files
Paths are relative to the Playground.extension folder.
Views.tab/Viewpoints.panel/Where_Am_I.pushbutton/bundle.yamlViews.tab/Viewpoints.panel/Where_Am_I.pushbutton/icon.dark.pngViews.tab/Viewpoints.panel/Where_Am_I.pushbutton/icon.pngViews.tab/Viewpoints.panel/Where_Am_I.pushbutton/icon.small.dark.pngViews.tab/Viewpoints.panel/Where_Am_I.pushbutton/icon.small.pngViews.tab/Viewpoints.panel/Where_Am_I.pushbutton/script.py
Install
- Only this tool. In Navisworks, click pyNavis > Playground, search for Where Am I, 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. Where Am I is on the Views tab, Viewpoints 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.
Views.tab/Viewpoints.panel/Where_Am_I.pushbutton/script.py View on GitHub"""Shows where the camera is: viewpoint, eye, heading, level, grid, lens, section, models, units and selection."""
from namo import vp_common, vp_whereami
from pynavis import forms, toast
document = vp_common.active_doc()
if not vp_common.has_models(document):
toast.info('No model open', 'Open or append a model, then ask again.')
else:
text = '\n'.join(vp_whereami.lines(vp_whereami.gather(document)))
forms.alert(text, title='Where am I', copy=text)
Library modules this tool uses
From the shared namo library, which installs with every tool. Each name opens the module on GitHub.
namo.vp_commonShared helpers for the Views tools (Viewpoints, Capture and Navigate panels).namo.vp_whereamiWhere Am I: one popup that says where the camera is, in words a coordinator would use on a call.
bundle.yaml
The bundle contract: the keys pyNavis reads for this tool.
Views.tab/Viewpoints.panel/Where_Am_I.pushbutton/bundle.yaml View on GitHubtitle: Where\nAm I
tooltip: One popup with where the camera is: the saved viewpoint it is on, eye coordinates, compass heading and pitch, nearest level and grid intersection, lens, section, models and selection. Copy puts it on the clipboard.
context: doc