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

Feature [Revit]: Excel parameter updater support for shared type parameters #3500

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

efdiloreto
Copy link

Description & motivation

I opened a thread in the community some days ago because I couldn't update some parameters in the Revit schedules using the Excel Connector. Here is the original post:

https://speckle.community/t/revit-excel-parameter-updater-graying-out-custom-parameters-in-excel/11613

The problem was that Revit considers shared parameters as ScheduleField.Instance instead of ScheduleField.ElementType. Therefore, if the parameter was a "Type Parameter" and was obtained from the element, it would always be considered as "ReadOnly."

The solution was to obtain the parameter from the "Type" rather than from the element. Because of this, I added some logic in the code to handle Shared Parameters.

Reference: https://www.revitapidocs.com/2024/9888db7d-00d0-4fd7-a1a9-cdd1fb5fce16.htm

Changes:

ConvertView.Schedule -> AddColumnMetadataToDataTable

Screenshots:

Using the sample Architecture Project add a shared type parameter to the planting category:
image

Add the type and the shared parameters to the existing schedule and sort by type (not itemize every instance)
image

Then:

  1. Send to Speckle
  2. Receive from Excel
  3. Edit in Excel
  4. Send To Speckle
  5. Receive in Revit

Checklist:

  • [x ] My pull request follows the guidelines in the Contributing guide?
  • [x ] My pull request does not duplicate any other open Pull Requests for the same update/change?
  • [x ] My commits are related to the pull request and do not amend unrelated code or documentation.
  • [ x] My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

@efdiloreto efdiloreto changed the title Feature: Excel parameter updater support for shared type parameters Feature [Revit]: Excel parameter updater support for shared type parameters Jun 11, 2024
@AlanRynne
Copy link
Member

Hi @efdiloreto!

Thanks for this! We'll try to get someone to review this as soon as possible.

Meanwhile, I see the CI is failing because you're not following our formatting rules (which we recently started enforcing)

You can ensure the code is fully formatted by running:

dotnet tool install in the root of the repository and then dotnet csharpier ./

The rest of the repo is already compliant so you should only see your changes be formatted.

Let us know if you have any further issues getting this done :)

@efdiloreto
Copy link
Author

Thanks Alan, will try to format it ASAP

@efdiloreto
Copy link
Author

@AlanRynne I think is passing the formatting test, but not sure why is failing now.

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.

None yet

2 participants