Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi-lingual support for Revit apps (Dynamo Nodes to be specific)

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
thomas
775 Views, 4 Replies

Multi-lingual support for Revit apps (Dynamo Nodes to be specific)

Dear community

 

I am looking to implement multi-lingual support for my Revit apps (written in C# and implemented into Dynamo Custom nodes) and I would like to know if using built-in parameters in my English version of Revit API would be automatically translated in other languages if say, a user in China or Germany were to use my nodes in their native language version of Revit? Is it this simple?

4 REPLIES 4
Message 2 of 5
jeremytammik
in reply to: thomas

Dear Thomas,

 

Thank you for your query.

 

If you intend to provide multi-lingual support at all, I would strongly recommend avoiding all language dependent code wherever possible.

 

That will significantly simplify your job and provide greater robustness and ease of maintenance.

 

Especially for built-in parameters, it is extremely simple to avoid all language dependencies by using the built-in enumeration value instead of the language dependent display string.

 

You should always avoid using the language dependent method of looking up parameters by name when possible.

 

You can use the corresponding built-in parameter enumeration value instead, for built-in parameters, or the GUID, for shared parameters.

 

Looking up a parameter by display name is only necessary for custom family parameters.

 

Here are two of many related discussions by The Building Coder:

 

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 5
thomas
in reply to: jeremytammik

Hi Jeremy

 

Perfect, thanks for the answer. Enums were another query I had which you've answered. 

 

The final issue I have is the default line style in a Revit Project. I look this up by name and therein lies one of the problems I've got. Fortunately its the default 'Line' style so I'm sure I can query this without using text. The problem I have with this strategy is when my program is executed in a Family document; it looks up the family document type, then concatenates the name to create the default line style in the family document (for example, the 'default' line style in a Door family is "Doors".)

 

Is there any way to obtain these line styles without relying on strings? 

 

Regards

Message 4 of 5
jeremytammik
in reply to: thomas

Thank you for your appreciation. 

  

Nope, sorry, I do not know off-hand.

 

Maybe the default line style is the one with the lowest element id?

  

Cheers,

  

Jeremy

  



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 5 of 5
thomas
in reply to: jeremytammik

Hi Jeremy

 

Not a problem, seems like that may well be a sound solution.

 

Thanks once again for your answers

 

Regards

 

Tom 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community