Esempio n. 1
0
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
Esempio n. 2
0
"""Opens the pyRevit blog."""
from pyrevit import script
from pyrevit.versionmgr import urls

__context__ = 'zerodoc'

script.open_url(urls.blog)
Esempio n. 3
0
    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()
Esempio n. 4
0
 def opengithubbranch(self, sender, args):
     if self.branch_name:
         branch_url = \
             urls.PYREVIT_GITHUBBRANCH.format(branch=self.branch_name)
         script.open_url(branch_url)
Esempio n. 5
0
 def opensupportpage(self, sender, args):
     script.open_url(urls.PYREVIT_SUPPORT)
Esempio n. 6
0
 def opengithubrepopage(self, sender, args):
     script.open_url(urls.PYREVIT_GITHUB)
Esempio n. 7
0
 def opentwitter(self, sender, args):
     script.open_url(urls.PYREVIT_TWITTER)
Esempio n. 8
0
 def opencredits(self, sender, args):
     script.open_url(urls.PYREVIT_CREDITS)
Esempio n. 9
0
"""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)
Esempio n. 10
0
"""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')
Esempio n. 11
0
"""Opens the git repository page."""
from pyrevit import script
from pyrevit.versionmgr import urls


__context__ = 'zero-doc'


script.open_url(urls.PYREVIT_GITHUB)
Esempio n. 12
0
"""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')
Esempio n. 13
0
"""Opens the documentation page."""
from pyrevit import script
from pyrevit.versionmgr import urls


__context__ = 'zerodoc'


script.open_url(urls.docs)
Esempio n. 14
0
"""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)
Esempio n. 15
0
"""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)
Esempio n. 16
0
 def openkeybaseprofile(self, sender, args):
     script.open_url(urls.PROFILE_EIN)
Esempio n. 17
0
 def openlicensepage(self, sender, args):
     script.open_url(urls.PYREVIT_LICENSE)
Esempio n. 18
0
"""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)
Esempio n. 19
0
 def openwiki(self, sender, args):
     script.open_url(urls.PYREVIT_WIKI)
Esempio n. 20
0
 def opendocs(self, sender, args):
     script.open_url(urls.PYREVIT_DOCS)
Esempio n. 21
0
 def openblog(self, sender, args):
     script.open_url(urls.PYREVIT_BLOG)
Esempio n. 22
0
 def opensupportpage(self, sender, args):
     script.open_url(urls.PYREVIT_PATREON)
Esempio n. 23
0
 def openyoutubechannel(self, sender, args):
     script.open_url(urls.PYREVIT_YOUTUBE)
Esempio n. 24
0
"""Opens the wiki page."""
from pyrevit import script
from pyrevit.versionmgr import urls

script.open_url(urls.PYREVIT_WIKI)
Esempio n. 25
0
 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)
Esempio n. 26
0
"""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)
Esempio n. 27
0
 def handle_url_click(self, sender, args):
     """Callback for handling click on package website url
     """
     script.open_url(sender.NavigateUri.AbsoluteUri)
Esempio n. 28
0
 def hyperlink(self, sender, e):
     script.open_url(str(sender.NavigateUri))
Esempio n. 29
0
"""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)
Esempio n. 30
0
 def openreleasenotes(self, sender, args):
     script.open_url(urls.PYREVIT_RELEASENOTES)