When I use Speckle.Revit.Parameters.ToNameValueRecord in Power BI, the parameters are “translated” as described in this tutorial Extracting Parameters from Revit Data in Power BI
with the folllowing results:
However, my parameters have these brackets following the name of the parameter, while in the tutorial the result is much cleaner.
For example, instead of Type I get Type [ELEM_TYPE_PARAM}
Is this behaviour normal? Does it have anything to do with the existence of Shared Parameters, or multiple parameters with the same name (but different GUID)?
I believe this covers the fact that the internal names in Revit are always in English, whereas Revit can be running in other languages. This has caused issues in the past, but I am speculating here that we’ve made a change since the tutorial was made.
You mean rename the columns after expanding? I was hoping to rename (and/or filter) the record field names before expanding, for example by dropping the bracket part and adding an integer when duplicates appear, I tried it using Record.RenameFields by using a key-value list, but it takes a lifetime to complete.
This is more of a Power BI than a Speckle issue, unless you have an easy way to tackle this!
I guess expanding the columns first is the simplest way, the only snag is finding the correct names each time, especially for Shared Parameters.
Let me provide more context about why parameters are named this way: In Revit, multiple parameters can have the same user-facing name. Therefore, we attach the internal API name at the end to accommodate this scenario. As suggested by @jonathon, you can remove them with a single function, but ensure that it doesn’t cause any issues. As I mentioned earlier, multiple parameters can have the same name.