Objective: I’m building a web application were a user can access Revits models uploaded by multiple Users. I use the graphQL API to get some various data from the models
Issue: If I export my model to speckle using a French version of Revit. All my parameter are in French. If I export a model from a English version of Revit, all my parameter are in English
My first problem is that I don’t know the Revit version Language of the User who exported the project. So i don’t know if i should query in English or French
My second problem is that, even if i knew the User Revit version Language, i would need to rewrite my query for every language
Example: I exported the same Revit model in speckle two different way. One using a French Revit version and the second with a English Revit version.
To retrieve the same information for the same Revit model i had to write two different query
Here my two querys :
For category at least you can look at the OST_Category which is the internal immutable English name for the category.
For properties you are mostly going to be looking to make a query for all language forms and client side join/normalise.
Internal to Revit there are complete property sets which will provide the kind of universality that you’re looking for however it would require a speckle on conversion and send to send huge amounts of data. In V2 we were doing this and by choosing not to do that, we have reduced the amount of data flowing around that is never used by some 75%..
Problem: Depending on the Revit UI language, certain naming and IDs in Speckle change, e.g., the Revit categories or unit names are translated. This is a problem when automating the extraction of parameters, looking for specific identifiers.
And it is somewhat challenging to identify the used language as there is no dedicated property in the commits. Is it possible to somehow include the language settings in the commit root, similar to the connector version?
Thanks Jonathon for your response — it’s really nice to see such good support from the team.
Kilian is definitely feeling my vibe
I agree that the language should be easier to retrieve, since it has become so important now.
With this new way of fetching data, I’m having difficulty seeing how the GraphQL API is still useful. Normally, GraphQL gives you flexibility to fetch exactly the data you need, but now that seems much harder to achieve.
To solve my problem, I see two possible solutions, but neither feels scalable:
1. Do a quick query to somehow detect the language and then write a query for every language, handled on the client side. I plan to have several queries in the final product, and I’ll need to support most Revit languages (at least eight). All I see is overhead
2. Fetch all the model data and parse it on the client side. This is where I feel we lose the strength of GraphQL, and I’m concerned about performance for big Revit project.
If you guys have any other ideas, I’ll gladly ear it
Thanks
Etienne
To add more value to the ticket can you @EtienneBelanger and @ks4 say more about how you and your companies would make use of this a part of your workflow and data pipelines?
Hello Etienne, I had the same issue as you. Sometimes my model is structured in French, other times in English. If it helps in your situation, I use shared parameters or an Assembly Code for each category to filter the data so that it works in both French and English. It really comes down to finding a way, at the source, to prepare the data so it doesn’t depend on the language used in Revit. Otherwise, the ACC connector seems to fix this problem since the information is sent directly in English without relying on the user’s UI language.
I had a quick look at your proposal, and I don’t think it would work in my situation.
For the shared parameters, if I understand correctly, the idea would be to add a custom parameter in the Revit model that I could easily detect in my query. The problem is that I don’t have control over the Revit models imported into Speckle. They are imported by different customers, and each of them manages their own Revit models independently. I simply offer a service afterward.
Regarding the ACC connector, it’s still a good idea. In my case, I want to offer a sharing platform for architects, manufacturers, engineers, etc. Since the ACC connector is a paid service, it would limit access to my platform to users who don’t have it. From what I know, this service is becoming more and more common in companies, so maybe someday, when it’s widely adopted, I’ll consider using it.
Anyway, don’t hesitate to correct me if there’s something I misunderstood, and thanks again for your suggestions—I really appreciate it.
Sorry for the delay—I was swamped
Thanks for considering this proposal.
In short, my company and I are building a web app where different people involved in building construction—architects, engineers, manufacturers, etc.—can easily share and contribute to a project. We also provide insights about the project to help support decision-making.
To give a more concrete example, here’s one of the workflows we support:
An architect uploads their project to Speckle.
They connect to our platform via Speckle and access their project.
We retrieve all the Walls from the project.
We propose a catalog of prefab walls offered by manufacturers.
Based on dimensions such as size and area, we calculate how many prefab wall panels are required.
Using the wall properties, we also display carbon values to help the architect make more eco-friendly choices.
In this example, wall properties such as area and length are critical to evaluating both the carbon footprint and the quantity of prefab walls required. We apply a similar approach to a few other building components as well.
For now, I’ll probably translate my queries into a few languages to retrieve objects and their properties. I’ll start with an initial query to detect the language being used. As mentioned by @ks4, it would be really helpful to have a root parameter to easily detect the language, since this is such an important aspect. After use this lang parameter to build my query. I don’t see that as a scalable solution, so not viable for our long term vision.
Ultimately, I plan to dynamically detect (client side) parameter names regardless of language by using a sample query, then reuse those parameter names to build the actual queries.
I hope this helps clarify the use case—fingers crossed we’ll see new Speckle features that can support this kind of workflow
Do take a look at the builtInCategory field then. This will return the canonical OST category always in internal language… English.
For other properties - this will rely on the acceptability of offering the host language as a version root property to record this, I think we are unlikely to adopt that but lets wee where the host language prop lands.