예제 #1
0
#from Tkinter import *
#from tkColorChooser import askcolor
"""class getColor():
    def __init__(self):
        #color = askcolor()[0]
        color = forms.select_swatch.show(title="Select alternate background color")

        self._config = script.get_config()

        self.selected_color = self._config.get_option('selected_color', default_value=(255,255,255))

        script.save_config()

    def cancel(self, sender, args):

        self.Close()

    def save_options(self, sender, args):
        self._config.selected_color = color

        script.save_config()
        self.Close()
"""
color = forms.select_swatch(title="Select alternate background color")

if not (color is None):
    #print(color)
    _config = script.get_config()
    _config.selected_color = str(color)
    script.save_config()
예제 #2
0
    forms.ask_for_string(default='test default',
                         prompt='test prompt',
                         title='test title'))

print(
    forms.ask_for_one_item(['test item 1', 'test item 2', 'test item 3'],
                           default='test item 2',
                           prompt='test prompt',
                           title='test title'))

print(
    forms.ask_for_date(default='2018/11/09',
                       prompt='test prompt',
                       title='test title'))

print(forms.select_swatch(title='test title', button_name='Test button name'))

test_forms(forms.select_titleblocks,
           test_title='Testing Selecting Titleblocks',
           filterfuncstr='pyRevit')

test_forms(forms.select_open_docs,
           test_title='Testing Selecting Open Docs',
           filterfunc=lambda x: 'pyRevit' in x.Title)

test_forms(forms.select_views,
           test_title='Testing Selecting Views',
           filterfuncstr='pyRevit')

test_forms(forms.select_sheets,
           test_title='Testing Selecting Sheets',