Skip to content

Commit

Permalink
v4.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
eirannejad committed Nov 23, 2018
2 parents f07fb27 + c2e852a commit 3c8a65c
Show file tree
Hide file tree
Showing 111 changed files with 613 additions and 254 deletions.
Empty file.
9 changes: 9 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Issue Description

Replace these lines with your description. Be as specific as possible and list steps to reproduce the issue. If you have any suggestions for the solution please list that as well.

### Environment

Open a command prompt and run the command below. Replace these lines with the results. Take a look at this markdown guide and wrap the command results in ``` when pasting here for correct formatting.

`pyrevit env`
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
Empty file added CONTRIBUTING.md
Empty file.
Empty file added CREDITS.txt
Empty file.
Binary file modified bin/NLog.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Common.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Common.pdb
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonCLI.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonCLI.pdb
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonWPF.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.CommonWPF.pdb
Binary file not shown.
Binary file modified bin/pyRevitLabs.Language.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.Language.pdb
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Revit.dll
Binary file not shown.
Binary file modified bin/pyRevitLabs.TargetApps.Revit.pdb
Binary file not shown.
Binary file modified bin/pyRevitUpdater.exe
Binary file not shown.
Binary file modified bin/pyrevit.exe
Binary file not shown.
Binary file modified bin/pyrevit.pdb
Binary file not shown.
15 changes: 15 additions & 0 deletions dev/WPFEdit/WPFEdit/WPFEdit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\pyrevitlib\pyrevit\forms\ImageListContainerStyle.xaml">
<Link>Forms\ImageListContainerStyle.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\pyrevitlib\pyrevit\forms\ImageListPanelStyle.xaml">
<Link>Forms\ImageListPanelStyle.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\pyrevitlib\pyrevit\forms\ProgressBar.xaml">
<Link>Forms\ProgressBar.xaml</Link>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -187,6 +197,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\pyrevitlib\pyrevit\forms\SwatchContainerStyle.xaml">
<Link>Forms\SwatchContainerStyle.xaml</Link>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="..\..\..\pyrevitlib\pyrevit\forms\TemplatePromptBar.xaml">
<Link>Forms\TemplatePromptBar.xaml</Link>
<Generator>MSBuild:Compile</Generator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#pylint: disable=C0103,E0401,W0703
from collections import defaultdict

from pyrevit import HOST_APP
from pyrevit.framework import List
from pyrevit import coreutils
from pyrevit import revit, DB, UI
Expand Down Expand Up @@ -244,8 +245,8 @@
'AREA ID: {2} '
'LEVEL: {3} '
'AREA: {4}'
.format(el.LookupParameter('Name').AsString().ljust(30),
el.LookupParameter('Number').AsString().ljust(10),
.format(el.Parameter[DB.BuiltInParameter.ROOM_NAME].AsString().ljust(30),
el.Parameter[DB.BuiltInParameter.ROOM_NUMBER].AsString().ljust(10),
el.Id,
str(el.Level.Name).ljust(50),
el.Area))
Expand All @@ -261,8 +262,8 @@
print('ROOM NAME: {0} '
'ROOM NUMBER: {1} '
'ROOM ID: {2}'
.format(el.LookupParameter('Name').AsString().ljust(30),
el.LookupParameter('Number').AsString().ljust(20),
.format(el.Parameter[DB.BuiltInParameter.ROOM_NAME].AsString().ljust(30),
el.Parameter[DB.BuiltInParameter.ROOM_NUMBER].AsString().ljust(20),
el.Id))

print('\n\nTOTAL ROOMS FOUND: {0}'.format(len(roomlist)))
Expand Down Expand Up @@ -302,8 +303,8 @@
for s in sheets:
print('NUMBER: {0} '
'NAME:{1}'
.format(s.LookupParameter('Sheet Number').AsString().rjust(10),
s.LookupParameter('Sheet Name').AsString().ljust(50)))
.format(s.Parameter[DB.BuiltInParameter.SHEET_NUMBER].AsString().rjust(10),
s.Parameter[DB.BuiltInParameter.SHEET_NAME].AsString().ljust(50)))

elif selected_switch == 'System Categories':
for cat in revit.doc.Settings.Categories:
Expand Down Expand Up @@ -337,22 +338,34 @@
views.append(el)

for v in views:
phasep = v.LookupParameter('Phase')
underlayp = v.LookupParameter('Underlay')
print('TYPE: {1}'
'ID: {2}'
'TEMPLATE: {3}'
'PHASE:{4} '
'UNDERLAY:{5} '
'{0}'
.format(v.ViewName,
str(v.ViewType).ljust(20),
str(v.Id).ljust(10),
str(v.IsTemplate).ljust(10),
phasep.AsValueString().ljust(25)
if phasep else '---'.ljust(25),
underlayp.AsValueString().ljust(25)
if underlayp else '---'.ljust(25)))
phasep = v.Parameter[DB.BuiltInParameter.VIEW_PHASE]
if HOST_APP.is_older_than(2016):
underlayp = v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_ID]
print('TYPE: {1} ID: {2} TEMPLATE: {3} PHASE:{4} UNDERLAY:{5} {0}'
.format(v.ViewName,
str(v.ViewType).ljust(20),
str(v.Id).ljust(10),
str(v.IsTemplate).ljust(10),
phasep.AsValueString().ljust(25)
if phasep else '---'.ljust(25),
underlayp.AsValueString().ljust(25)
if underlayp else '---'.ljust(25)))
else:
underlaytp = v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_TOP_ID]
underlaybp = \
v.Parameter[DB.BuiltInParameter.VIEW_UNDERLAY_BOTTOM_ID]
print('TYPE: {1} ID: {2} TEMPLATE: {3} PHASE:{4} '
'UNDERLAY TOP:{5} UNDERLAY BOTTOM:{6} {0}'
.format(v.ViewName,
str(v.ViewType).ljust(20),
str(v.Id).ljust(10),
str(v.IsTemplate).ljust(10),
phasep.AsValueString().ljust(25)
if phasep else '---'.ljust(25),
underlaytp.AsValueString().ljust(25)
if underlaytp else '---'.ljust(25),
underlaybp.AsValueString().ljust(25)
if underlaybp else '---'.ljust(25)))

elif selected_switch == 'View Templates':
cl_views = DB.FilteredElementCollector(revit.doc)
Expand Down Expand Up @@ -472,10 +485,8 @@ def isline(line):

elif selected_switch == 'Point Cloud Instances':
for pc in revit.query.get_pointclouds(doc=revit.doc):
print('Name: {}\tWorkset:{}'.format(
pc.Name,
pc.LookupParameter('Workset').AsValueString())
)
ws = revit.doc.GetElement(pc.WorksetId)
print('Name: {}\tWorkset:{}'.format(pc.Name, ws.Name if ws else '---'))

elif selected_switch == 'Sheets with Hidden Characters':
for sheet in revit.query.get_sheets(doc=revit.doc):
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
"""Unit Tests for pyrevit.coreutils.appdata module."""
#pylint: disable=E0401
import re

import pyrevit
from pyrevit.coreutils import appdata


__context__ = 'zerodoc'


TEST_STRINGS = ['pyRevit_some-randomename',
'pyRevit_2018_some-randomename',
'pyRevit_2018_14422_some-randomname',
'pyRevit_eirannejad_some-randomename',
'pyRevit_2018_eirannejad_some-randomename',
'pyRevit_2018_eirannejad_14422_some-randomename']

for tstring in TEST_STRINGS:
print('Testing: "{}"'.format(tstring))

# e.g. pyRevit_2018_eirannejad_14422_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_STAMPED_USER_REGEX, tstring)
if m:
print('\tMatched: {}'.format(
pyrevit.PYREVIT_FILE_PREFIX_STAMPED_USER_REGEX))
print('\t' + str(m.groupdict()))

# e.g. pyRevit_2018_14422_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_STAMPED_REGEX, tstring)
if m:
print('\tMatched: {}'.format(pyrevit.PYREVIT_FILE_PREFIX_STAMPED_REGEX))
print('\t' + str(m.groupdict()))

# e.g. pyRevit_2018_eirannejad_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_USER_REGEX, tstring)
if m:
print('\tMatched: {}'.format(pyrevit.PYREVIT_FILE_PREFIX_USER_REGEX))
print('\t' + str(m.groupdict()))

# e.g. pyRevit_2018_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_REGEX, tstring)
if m:
print('\tMatched: {}'.format(pyrevit.PYREVIT_FILE_PREFIX_REGEX))
print('\t' + str(m.groupdict()))

# e.g. pyRevit_eirannejad_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_UNIVERSAL_USER_REGEX, tstring)
if m:
print('\tMatched: {}'.format(
pyrevit.PYREVIT_FILE_PREFIX_UNIVERSAL_USER_REGEX))
print('\t' + str(m.groupdict()))

# e.g. pyRevit_
m = re.match(pyrevit.PYREVIT_FILE_PREFIX_UNIVERSAL_REGEX, tstring)
if m:
print('\tMatched: {}'.format(
pyrevit.PYREVIT_FILE_PREFIX_UNIVERSAL_REGEX))
print('\t' + str(m.groupdict()))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Unit Tests for pyrevit.forms module."""
#pylint: disable=E0401
from pyrevit import script
from pyrevit import forms


__context__ = 'zerodoc'


from pyrevit import forms


def test_forms(forms_func, test_title, filterfuncstr='', *args, **kwargs):
print('\n\n' + test_title)
test_title += '({}):'
Expand Down Expand Up @@ -100,3 +100,8 @@ def test_forms(forms_func, test_title, filterfuncstr='', *args, **kwargs):
group_selector_title='Select Integer Range:',
multiselect=True
))


print(
forms.select_image(script.get_bundle_files('images/'))
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Run All Tests
Engine Tests
pyRevitLabs Module Tests
Output Window Tests
Appdata Module Tests
Forms Module Tests
Revit Module Tests
Script Module Tests
Expand Down
Loading

0 comments on commit 3c8a65c

Please sign in to comment.