def open_command_helpurl(pyrvtcmd): script_content = coreutils.ScriptFileParser(selected_cmd.script) helpurl = script_content.extract_param(exts.COMMAND_HELP_URL) if helpurl: script.open_url(helpurl) return True return False
"""Opens the pyRevit blog.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zerodoc' script.open_url(urls.blog)
def __init__(self, xaml_file_name): forms.WPFWindow.__init__(self, xaml_file_name) # verify keynote file existence self._kfile = revit.query.get_keynote_file(doc=revit.doc) if not self._kfile or not op.exists(self._kfile): self._kfile = None forms.alert("Keynote file is not accessible. " "Please select a keynote file.") self._change_kfile() # if a keynote file is still not set, return if not self._kfile: raise Exception('Keynote file is not setup.') self._conn = None try: self._conn = kdb.connect(self._kfile) except System.TimeoutException as toutex: forms.alert(toutex.Message, exitscript=True) except Exception as ex: logger.debug('Connection failed | %s' % ex) res = forms.alert( "Existing keynote file needs to be converted to " "a format usable by this tool. The resulting keynote " "file is still readble by Revit and could be shared " "with other projects. Users should NOT be making changes to " "the existing keynote file during the conversion process.\n" "Are you sure you want to convert?", options=["Convert", "Give me more info"]) if res: if res == "Convert": try: self._convert_existing() forms.alert("Conversion completed!") if not self._conn: forms.alert( "Launch the tool again to manage keynotes.", exitscript=True) except Exception as convex: logger.debug('Legacy conversion failed | %s' % convex) forms.alert("Conversion failed! %s" % convex, exitscript=True) elif res == "Give me more info": script.open_url('https://eirannejad.github.io/pyRevit') script.exit() else: forms.alert("Keynote file is not yet converted.", exitscript=True) self._cache = [] self._allcat = kdb.RKeynote(key='', text='-- ALL CATEGORIES --', parent_key='', locked=False, owner='', children=None) self._config = script.get_config() self._used_keysdict = self.get_used_keynote_elements() self.load_config() self.search_tb.Focus()
def opengithubbranch(self, sender, args): if self.branch_name: branch_url = \ urls.PYREVIT_GITHUBBRANCH.format(branch=self.branch_name) script.open_url(branch_url)
def opensupportpage(self, sender, args): script.open_url(urls.PYREVIT_SUPPORT)
def opengithubrepopage(self, sender, args): script.open_url(urls.PYREVIT_GITHUB)
def opentwitter(self, sender, args): script.open_url(urls.PYREVIT_TWITTER)
def opencredits(self, sender, args): script.open_url(urls.PYREVIT_CREDITS)
"""Opens the issue tracker on github to report bugs and issues.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zerodoc' script.open_url(urls.githubissues)
"""Submit US/LATAM project.""" from pyrevit import script from pyrevit.versionmgr import urls __name__ = "Submit US/LATAM Project" __context__ = 'zerodoc' script.open_url( 'https://airtable.com/shrQMcRGssjnimPgC?prefill_Progress=SUBMITTED')
"""Opens the git repository page.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zero-doc' script.open_url(urls.PYREVIT_GITHUB)
"""Opens googlemaps.""" from pyrevit import script from pyrevit.versionmgr import urls __name__ = "R1T1" __context__ = 'zerodoc' script.open_url( 'https://www.google.com/maps/@-31.4441744,-64.192071,3616m/data=!3m1!1e3')
"""Opens the documentation page.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zerodoc' script.open_url(urls.docs)
"""Opens the Anatomy of a Script page in the default browser.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zerodoc' __title__ = 'Script\nAnatomy' script.open_url(urls.PYREVIT_BLOG_SCRIPTANAT)
"""Opens the developer docs page.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zero-doc' __title__ = "Developer\nDocs" script.open_url(urls.PYREVIT_DOCS)
def openkeybaseprofile(self, sender, args): script.open_url(urls.PROFILE_EIN)
def openlicensepage(self, sender, args): script.open_url(urls.PYREVIT_LICENSE)
"""Opens the pyRevit blog.""" # -*- coding=utf-8 -*- #pylint: disable=import-error,invalid-name,broad-except from pyrevit import script from pyrevit.versionmgr import urls script.open_url(urls.PYREVIT_BLOG)
def openwiki(self, sender, args): script.open_url(urls.PYREVIT_WIKI)
def opendocs(self, sender, args): script.open_url(urls.PYREVIT_DOCS)
def openblog(self, sender, args): script.open_url(urls.PYREVIT_BLOG)
def opensupportpage(self, sender, args): script.open_url(urls.PYREVIT_PATREON)
def openyoutubechannel(self, sender, args): script.open_url(urls.PYREVIT_YOUTUBE)
"""Opens the wiki page.""" from pyrevit import script from pyrevit.versionmgr import urls script.open_url(urls.PYREVIT_WIKI)
def opengithubcommits(self, sender, args): if self.branch_name: commits_url = \ urls.PYREVIT_GITHUBBRANCH_COMMIT.format(branch=self.branch_name) script.open_url(commits_url)
"""Opens the issue tracker on github to report bugs and issues.""" from pyrevit import script from pyrevit.versionmgr import urls __context__ = 'zero-doc' script.open_url(urls.PYREVIT_GITHUBISSUES)
def handle_url_click(self, sender, args): """Callback for handling click on package website url """ script.open_url(sender.NavigateUri.AbsoluteUri)
def hyperlink(self, sender, e): script.open_url(str(sender.NavigateUri))
"""Opens the website that is providing the icons for the tools.""" from pyrevit import script __context__ = 'zerodoc' url = 'https://icons8.com/icon/set/revit/windows' script.open_url(url)
def openreleasenotes(self, sender, args): script.open_url(urls.PYREVIT_RELEASENOTES)