Closed efdiloreto closed 3 days ago
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 :)
Thanks Alan, will try to format it ASAP
@AlanRynne I think is passing the formatting test, but not sure why is failing now.
I made the discussed change and created a new PR https://github.com/specklesystems/speckle-sharp/pull/3585. If that one gets merged then we can close this.
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](https://github.com/specklesystems/speckle-sharp/assets/23631382/1c7be263-8f18-4966-ae58-969d30ff1399)
Add the type and the shared parameters to the existing schedule and sort by type (not itemize every instance)![image](https://github.com/specklesystems/speckle-sharp/assets/23631382/02b77c01-17e3-46db-bbf6-9070baf4abe3)
Then:
Checklist: