TM1 coding extension for VSCode

Advertisements, add-ons and other commercial information
Post Reply
ndivine
Posts: 20
Joined: Wed Feb 23, 2011 6:43 pm
OLAP Product: TM1
Version: Latest
Excel Version: 2013

TM1 coding extension for VSCode

Post by ndivine »

We just put out a free TM1 coding extension for VSCode (also free).

I've been doing my TM1 coding in VSCode for several months now and I think it's a great environment and the extension makes it even better with syntax highlighting, code snippets, etc.

Happy coding!
https://marketplace.visualstudio.com/it ... tm1-helper

Admin : Moved to commercial as post made by or on behalf of a legal entity
CellPutN
Posts: 22
Joined: Mon Oct 01, 2018 1:50 pm
OLAP Product: TM1
Version: 10.2.20500.75
Excel Version: 2016
Location: Montreal, Canada

Re: TM1 coding extension for VSCode

Post by CellPutN »

Well done !! Much better and PAW or TI Helper from Cubewise.

But I have a question.
IMPORTANT: IBM Planning Analytics/Cognos TM1 does not allow for direct editing of the .RUX and .PRO files. All editing must be done by copying the appropriate text from the standard TM1 interfaces and pasted into VSCode. Editing can take place there, and once changes are completed, pasted back into the standard interface (such as Process Editor or Rules Editor)
Is there a parameter or something in the tm1s.cfg that we can change to allow direct editing of the .RUX or .PRO files ?
Wim Gielis
MVP
Posts: 3098
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1 coding extension for VSCode

Post by Wim Gielis »

CellPutN wrote: Sat Jan 19, 2019 5:59 pmBut I have a question.

Is there a parameter or something in the tm1s.cfg that we can change to allow direct editing of the .RUX or .PRO files ?
I doubt it very much.
For me, what works best until now, is using AutoHotKey to have a hotkey (F10) copy the code of the selected tab and paste into Notepad++, either a new file in an open instance, either a new instance. Another hotkey transfers the code back to the TI editor. I assume you would need a similar approach. Or use the TM1 REST API to update a certain tab of the process based on the code. In Notepad++ I have on the first line of the document the information of the window that will receive the code again.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
ndivine
Posts: 20
Joined: Wed Feb 23, 2011 6:43 pm
OLAP Product: TM1
Version: Latest
Excel Version: 2013

Re: TM1 coding extension for VSCode

Post by ndivine »

Wim Gielis wrote: Sat Jan 19, 2019 9:26 pm
CellPutN wrote: Sat Jan 19, 2019 5:59 pmBut I have a question.

Is there a parameter or something in the tm1s.cfg that we can change to allow direct editing of the .RUX or .PRO files ?
I doubt it very much.
For me, what works best until now, is using AutoHotKey to have a hotkey (F10) copy the code of the selected tab and paste into Notepad++, either a new file in an open instance, either a new instance. Another hotkey transfers the code back to the TI editor. I assume you would need a similar approach. Or use the TM1 REST API to update a certain tab of the process based on the code. In Notepad++ I have on the first line of the document the information of the window that will receive the code again.
There's no parameter that I know of. Unfortunately, that's just an annoying but necessary part of using these text editors for coding. It looks like Wim streamlined it a bit, I just do it the old fashioned way.

Wim, I find your MDX page very useful, I use it all the time.
Emixam
Posts: 139
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: The Internet

Re: TM1 coding extension for VSCode

Post by Emixam »

Hello ndivine,

Is it me or the syntax highlighting no longer works ? Thanks
Attachments
tm1helper.png
tm1helper.png (39.67 KiB) Viewed 37925 times
Last edited by Emixam on Mon Jun 17, 2019 7:33 pm, edited 1 time in total.
kangkc
Community Contributor
Posts: 206
Joined: Fri Oct 17, 2008 2:40 am
OLAP Product: TM1, PA , TMVGate
Version: 2.x
Excel Version: 36x
Location: Singapore
Contact:

Re: TM1 coding extension for VSCode

Post by kangkc »

With the GIT support in PA 2.0.7, this may work.
Emixam
Posts: 139
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: The Internet

Re: TM1 coding extension for VSCode

Post by Emixam »

Deleted
Last edited by Emixam on Sat May 16, 2020 3:01 am, edited 1 time in total.
BobMilli
Posts: 8
Joined: Thu Feb 28, 2013 9:45 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TM1 coding extension for VSCode

Post by BobMilli »

Hello,
Beside the fact that this VSCode TI Helper is really a great thing I've got the same issue as Emixam, no color coding :-(
Regards,
Bob
Emixam
Posts: 139
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: The Internet

Re: TM1 coding extension for VSCode

Post by Emixam »

There's an issue with the CarpeDatum Dark color theme on the new VS Code version (1.35). Simply change the color theme (File-­>Preference->Color Theme -> Dark+) and you'll see the syntax highlighting.

Cheers!
Attachments
2019-06-26_08h16_53.png
2019-06-26_08h16_53.png (46.74 KiB) Viewed 37727 times
BobMilli
Posts: 8
Joined: Thu Feb 28, 2013 9:45 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TM1 coding extension for VSCode

Post by BobMilli »

Thanks Emixam,
You've made my day :-)
Regards,
Bob
Bakkone
Posts: 119
Joined: Mon Oct 27, 2014 10:50 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TM1 coding extension for VSCode

Post by Bakkone »

Live editing should be doable via rest. But Im afraid I dont have the skills to make it happen.

But as far as I understood it thats how the TM1 add-in for sublime does it.
HighKeys
Posts: 116
Joined: Fri Aug 09, 2019 10:11 am
OLAP Product: TM1 / TM1 Web / Perspectives
Version: Planning Analytics V2.0.9
Excel Version: Office 365

Re: TM1 coding extension for VSCode

Post by HighKeys »

Sorry for the question, but is there any way to get it into normal Visual Studio?


Thanks and BR

Edit:

Long research, its not possible... i managed to get a copy of VS Code for me. :)
Emixam
Posts: 139
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: PA 2.0.x
Excel Version: 2016
Location: The Internet

Re: TM1 coding extension for VSCode

Post by Emixam »

HighKeys wrote: Fri Sep 13, 2019 9:23 am Sorry for the question, but is there any way to get it into normal Visual Studio?


Thanks and BR

Edit:

Long research, its not possible... i managed to get a copy of VS Code for me. :)
Visual Studio Code is available for free.

https://code.visualstudio.com/
HighKeys
Posts: 116
Joined: Fri Aug 09, 2019 10:11 am
OLAP Product: TM1 / TM1 Web / Perspectives
Version: Planning Analytics V2.0.9
Excel Version: Office 365

Re: TM1 coding extension for VSCode

Post by HighKeys »

yea i know, it was just a IT Policy thing here in the company, cause they dont have it in there "Standard packages" but i made a Agreement :)
Post Reply