Ejemplo n.º 1
0
    def __init__(self, xaml_file_name):
        """Sets up the settings ui
        """

        WPFWindow.__init__(self, xaml_file_name)
        try:
            self._setup_core_options()
        except Exception as setup_params_err:
            logger.error('Error setting up a parameter. Please update '
                         'pyRevit again. | {}'.format(setup_params_err))

        self._setup_user_extensions_list()
        self._setup_env_vars_list()

        # check boxes for each version of Revit
        # this could be automated but it pushed me to verify and test
        # before actually addin a new Revit version to the list
        self._addinfiles_cboxes = {
            '2015': self.revit2015_cb,
            '2016': self.revit2016_cb,
            '2017': self.revit2017_cb,
            '2018': self.revit2018_cb
        }

        self._setup_usagelogging()
        self._setup_addinfiles()
Ejemplo n.º 2
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        self.hide_element(self.clrsearch_b)
        self.hide_element(self.commandresults_dg)
        self.usagelogdir_tb.IsReadOnly = True

        self._update_cur_logpath()
Ejemplo n.º 3
0
    def __init__(self, xaml_file_name, rvt_elements):
        # cleanup selection (pick only acceptable curves)
        self.selected_lines = self._cleanup_selection(rvt_elements)

        # create pattern maker window and process options
        WPFWindow.__init__(self, xaml_file_name)
        self.dottypes_cb.ItemsSource = patmaker.DOT_TYPES
        self.dottypes_cb.SelectedIndex = 0
        self.pat_name_tb.Focus()
Ejemplo n.º 4
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        self.set_image_source('image_credits', 'credits.png')
        self.set_image_source('pyrevit_logo', 'pyRevitlogo.png')
        self.set_image_source('keybase_profile', 'keybase.png')

        self.version_info.Text = 'v {}'.format(PYREVIT_VERSION.get_formatted())
        self.pyrevit_subtitle.Text += '\nRunning on IronPython {}.{}.{}'.format(sys.version_info.major,
                                                                                sys.version_info.minor,
                                                                                sys.version_info.micro)
Ejemplo n.º 5
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)
        self._setup_core_options()
        self._setup_user_extensions_list()
        self._setup_env_vars_list()
        self._addinfiles_checkboxes = {
            '2015': self.revit2015_cb,
            '2016': self.revit2016_cb,
            '2017': self.revit2017_cb
        }

        self._setup_addinfiles()
Ejemplo n.º 6
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        try:
            self.halftone.IsChecked = my_config.halftone
            self.transparency.IsChecked = my_config.transparency
            self.proj_line_color.IsChecked = my_config.proj_line_color
            self.proj_line_pattern.IsChecked = my_config.proj_line_pattern
            self.proj_line_weight.IsChecked = my_config.proj_line_weight
            self.proj_fill_color.IsChecked = my_config.proj_fill_color
            self.proj_fill_pattern.IsChecked = my_config.proj_fill_pattern
            self.proj_fill_pattern_visibility.IsChecked = my_config.proj_fill_pattern_visibility
            self.cut_line_color.IsChecked = my_config.cut_line_color
            self.cut_line_pattern.IsChecked = my_config.cut_line_pattern
            self.cut_line_weight.IsChecked = my_config.cut_line_weight
            self.cut_fill_color.IsChecked = my_config.cut_fill_color
            self.cut_fill_pattern.IsChecked = my_config.cut_fill_pattern
            self.cut_fill_pattern_visibility.IsChecked = my_config.cut_fill_pattern_visibility

            self.dim_override.IsChecked = my_config.dim_override
            self.dim_textposition.IsChecked = my_config.dim_textposition
            self.dim_above.IsChecked = my_config.dim_above
            self.dim_below.IsChecked = my_config.dim_below
            self.dim_prefix.IsChecked = my_config.dim_prefix
            self.dim_suffix.IsChecked = my_config.dim_suffix

        except:
            self.halftone.IsChecked = my_config.halftone = True
            self.transparency.IsChecked = my_config.transparency = True
            self.proj_line_color.IsChecked = my_config.proj_line_color = True
            self.proj_line_pattern.IsChecked = my_config.proj_line_pattern = True
            self.proj_line_weight.IsChecked = my_config.proj_line_weight = True
            self.proj_fill_color.IsChecked = my_config.proj_fill_color = True
            self.proj_fill_pattern.IsChecked = my_config.proj_fill_pattern = True
            self.proj_fill_pattern_visibility.IsChecked = my_config.proj_fill_pattern_visibility = True
            self.cut_line_color.IsChecked = my_config.cut_line_color = True
            self.cut_line_pattern.IsChecked = my_config.cut_line_pattern = True
            self.cut_line_weight.IsChecked = my_config.cut_line_weight = True
            self.cut_fill_color.IsChecked = my_config.cut_fill_color = True
            self.cut_fill_pattern.IsChecked = my_config.cut_fill_pattern = True
            self.cut_fill_pattern_visibility.IsChecked = my_config.cut_fill_pattern_visibility = True

            self.dim_override.IsChecked = my_config.dim_override = True
            self.dim_textposition.IsChecked = my_config.dim_textposition = False
            self.dim_above.IsChecked = my_config.dim_above = True
            self.dim_below.IsChecked = my_config.dim_below = True
            self.dim_prefix.IsChecked = my_config.dim_prefix = True
            self.dim_suffix.IsChecked = my_config.dim_suffix = True

            this_script.save_config()
Ejemplo n.º 7
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)
        try:
            self._setup_core_options()
        except Exception as setup_params_err:
            logger.error('Error setting up a parameter. Please update pyRevit again. | {}'.format(setup_params_err))

        self._setup_user_extensions_list()
        self._setup_env_vars_list()
        self._addinfiles_checkboxes = {'2015': self.revit2015_cb,
                                       '2016': self.revit2016_cb,
                                       '2017': self.revit2017_cb}

        self._setup_usagelogging()
        self._setup_addinfiles()
Ejemplo n.º 8
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        self.hide_element(self.clrsearch_b)
        self._current_entry_list = list()
        self._log_files = {
            op.basename(f): f
            for f in appdata.list_data_files('log')
        }
        self.logfiles_cb.ItemsSource = self._log_files.keys()
        if FILE_LOG_FILENAME in self._log_files.keys():
            self.logfiles_cb.SelectedIndex = self.logfiles_cb.ItemsSource.index(
                FILE_LOG_FILENAME)
        else:
            self.logfiles_cb.SelectedIndex = 0
Ejemplo n.º 9
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        for cat in doc.Settings.Categories:
            if cat.Name == 'Sheets':
                self.sheet_cat_id = cat.Id

        self.schedules_cb.ItemsSource = self._get_sheet_index_list()
        self.schedules_cb.SelectedIndex = 0

        item_cstyle = self.sheets_lb.ItemContainerStyle
        item_cstyle.Setters.Add(Setter(ListViewItem.AllowDropProperty, True))
        item_cstyle.Setters.Add(
            EventSetter(ListViewItem.PreviewMouseLeftButtonDownEvent,
                        MouseButtonEventHandler(self.preview_mouse_down)))
        item_cstyle.Setters.Add(
            EventSetter(ListViewItem.DropEvent,
                        DragEventHandler(self.drop_sheet)))
Ejemplo n.º 10
0
 def __init__(self, xaml_file_name):
     WPFWindow.__init__(self, xaml_file_name)
     self._sheet_dict = dict()
     self._titleblock_id = None
Ejemplo n.º 11
0
 def __init__(self, xaml_file_name):
     WPFWindow.__init__(self, xaml_file_name)
Ejemplo n.º 12
0
    def __init__(self, xaml_file_name):
        WPFWindow.__init__(self, xaml_file_name)

        self.logitems_lb.ItemsSource = []
Ejemplo n.º 13
0
    def __init__(self, xaml_file_name):
        self.linked_models = []

        WPFWindow.__init__(self, xaml_file_name)
        self._find_linked_models()
        self.viewtype_cb.SelectedIndex = 0
Ejemplo n.º 14
0
    def __init__(self, xaml_file_name):
        self.linked_models = []

        WPFWindow.__init__(self, xaml_file_name)
        self._find_linked_models()
Ejemplo n.º 15
0
 def __init__(self, xaml_file_name):
     WPFWindow.__init__(self, xaml_file_name)
     self.DataContext = self
Ejemplo n.º 16
0
 def __init__(self, xaml_file_name):
     WPFWindow.__init__(self, xaml_file_name)
     self._setup_ext_dirs_ui(user_config.get_ext_root_dirs())
     self._setup_ext_pkg_ui(extpackages.get_ext_packages())