Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modification to Import/Export Family Configs #1117

Merged
merged 7 commits into from
Jan 14, 2021

Conversation

msmith320
Copy link

The original import and export family configs buttons did not account for shared parameters or parameters whose values were of type ElementId. The following scripts use the GUID of shared parameters and a specific string to keep track of the shared parameters and the Load Classification Type. The export button saves a txt file in addition to the yaml file with the same name and in the same directory. For import, make sure both the txt and yaml file are in the same directory.

eirannejad and others added 7 commits August 30, 2020 12:44
# Conflicts:
#	bin/pyrevit-hosts.json
The original behavior would assume all parameters were not shared.
This commit detects shared parameters, and if they exist, creates
another file and uses it to import them into Revit.
… string.

The yaml file assumes the Load Classification Type to be a string, so when using
the original import button, the Load Classification in Revit would not populate.
The export script attaches a string to the beginning of the Load Classification
Type in the yaml file. When the import script comes across the notifier string,
it imports the value as a Load Classification Type. A more general solution is
necessary for other types of parameters that use a ElementId.
@msmith320
Copy link
Author

Please let me know if I need to make any changes.

@eirannejad eirannejad changed the base branch from master to pr/1117 January 14, 2021 21:42
@eirannejad eirannejad merged commit a7a117d into pyrevitlabs:pr/1117 Jan 14, 2021
@eirannejad
Copy link
Collaborator

Merged into pr/1117 for review and will be merged into develop after

@eirannejad
Copy link
Collaborator

eirannejad commented Jan 15, 2021

@msmith320 Ok I made a series of updates to this in the pr/1117 branch. Would you mind pulling and testing this?

  • No more extra shared parameter text file. The contents are stored in the yaml file
  • Cleaned up the code and added safe read write text file methods for Revit text encoding
  • Changed the value formatting for electrical loads to use the : as separator to match similar values

Once ready I can merge this into develop

@msmith320
Copy link
Author

@eirannejad Thanks for looking at the scripts. I commented a few adjustments in your commit. There was a naming issue with DB.Electrical.ElectricalLoadClassification and an issue with a variable being defined in an if block.

@eirannejad
Copy link
Collaborator

Ok great. This is already merged so would you mind sending a new PR to develop with your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants