Using RESX-files inside of Revit macros

Using RESX-files inside of Revit macros

Anonymous
Not applicable
1,805 Views
8 Replies
Message 1 of 9

Using RESX-files inside of Revit macros

Anonymous
Not applicable

Hi,

 

Revit 2017.1.1.

 

Usually I use RESX-files for localization of my applications. I work with their content through ResourceManager class. Of course, I create the default resources which are built-in into my target assembly.

 

Later, if I need then I will add some count of special localized resources: .\en\MyAssemblyName.resources.dll, .\ru\MyAssemblyName.resources.dll, etc. It is very convenient and I add new localizations quickly and without problems (when I need it).

 

As I mentioned earlier, I create the macroses inside of SharpDevelop as the first step of add-in's developing. Of course, I want to use RESX-files at this case too (at least the default resources). But built-in SharpDevelop can't handle such files. I added RESX-file manually but it doesn't work still. I get the compilation error:

 

> Inadmissible Resx file. Inadmissible data at the root level., line 1, line item 1.

> (MSB3103) - C:\ProgramData\Autodesk\Revit\Macros\2017\Revit\AppHookup\Sandbox\Source\Sandbox\ThisApplication.resx:1 

 

Is it possible to solve this problem?

 

Look my attached screens, please.

 

 

 

 

0 Likes
1,806 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable

Usual SharpDevelop which is not built-in into Revit application, works with RESX-files and build such projects without problems. And its compilation's result works in Revit successfully. But such SharpDevelop doesn't support the 64-bit debugging...

Look the attached screens, please. 

0 Likes
Message 3 of 9

Anonymous
Not applicable

 

You should try to get some more attention for support of 64 bit with SharpDevelop...

 

Add 64-bit compatibility

Github - SharpDevelop Issues - 64bit

 

0 Likes
Message 4 of 9

jeremy_tammik
Alumni
Alumni

Dear Andrey,

 

Thank you for your query.

 

I'm sorry I only noticed it today.

 

Have you resolved the issue, or are you still stuck?

 

Did TeunHam's advice help?

 

I can raise an issue with the development team for this, if you like.

 

Can you provide a reproducible case and provide all the step-by-step detailed instructions?

 

I guess they would have to include how to set up the external stand-alone SharpDevelop IDE.

 

What do you think?

 

Thank you!

 

Best regards,

 

Jeremy

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 9

Anonymous
Not applicable

Hi Jeremy,

I thought that you ignored my question. 🙂

> Have you resolved the issue, or are you still stuck?

No, I have not.

> Did TeunHam's advice help?

No, his advice is not related with my question.

> I can raise an issue with the development team for this, if you like.

I would be grateful to you at this case.   

> Can you provide a reproducible case and provide all the step-by-step detailed instructions?

I showed to you expanded info how to work with RESX-files here: http://forums.autodesk.com/t5/revit-api-forum/why-the-language-key-switches-currentculture-instead-o...

Did you see it?

> I guess they would have to include how to set up the external stand-alone SharpDevelop IDE.

Why? It works without problems in stand-alone SharpDevelop IDE. The problem is with SharpDevelop IDE which is already built in Revit.
They can dowload and install stand-alone SharpDevelop IDE from its official site: http://www.icsharpcode.net/OpenSource/SD/Default.aspx

Also, I described some additional problems which are related with Revit's SharpDevelop here: https://revit-addins.blogspot.ru/2017/01/ide.html

Best regards,
Andrey

0 Likes
Message 6 of 9

jeremytammik
Autodesk
Autodesk

Ok, I'll look into it and raise an issue with the development team.

 

Meanwhile, here is a draft version of the blog post on the multi language support that I am working on right now:

 

file:///Users/tammikj/a/doc/revit/tbc/git/a/1523_multi_lang_resource.html

 

Please take a look and let me know what you think.

 

So many exciting new items in it...

 

More later...

 

Cheers,

 

Jeremy



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

0 Likes
Message 7 of 9

Anonymous
Not applicable

> file:///Users/tammikj/a/doc/revit/tbc/git/a/1523_multi_lang_resource.html

 

I haven't access to your local computer. 🙂 Pay attention to your link - it is a local link instead of web-link.

 

> So many exciting new items in it...

 

Look my video what I mentioned to you in my previous message. I have a hope it will be helpful for you.

0 Likes
Message 8 of 9

jeremytammik
Autodesk
Autodesk

Sorry, my mistake, a cut-and-paste error:

 

http://jeremytammik.github.io/tbc/a/1523_multi_lang_resource.html

 



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

0 Likes
Message 9 of 9

Anonymous
Not applicable

Delete the "My monologue is ended." sentence.

Jeremy, also I showed expected (right) behaviour in the video: https://www.youtube.com/watch?v=f1IBVgP7T1I&feature=youtu.be

 

I haven't other notes.

0 Likes