TM1 coding extension for VSCode

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

TM1 coding extension for VSCode

Post by ndivine » Fri Jan 18, 2019 3:25 pm

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 » Sat Jan 19, 2019 5:59 pm

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: 2257
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: TM1 coding extension for VSCode

Post by Wim Gielis » Sat Jan 19, 2019 9:26 pm

CellPutN wrote:
Sat Jan 19, 2019 5:59 pm
But 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

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

ndivine
Posts: 19
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 » Mon Jan 21, 2019 8:20 pm

Wim Gielis wrote:
Sat Jan 19, 2019 9:26 pm
CellPutN wrote:
Sat Jan 19, 2019 5:59 pm
But 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: 39
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: TM1 10.2
Excel Version: 2016

Re: TM1 coding extension for VSCode

Post by Emixam » Wed Jun 12, 2019 4:32 pm

Hello ndivine,

Is it me or the syntax highlighting no longer works ? Thanks
Attachments
tm1helper.png
tm1helper.png (39.67 KiB) Viewed 12048 times
Last edited by Emixam on Mon Jun 17, 2019 7:33 pm, edited 1 time in total.

kangkc
Community Contributor
Posts: 194
Joined: Fri Oct 17, 2008 2:40 am
OLAP Product: TM1
Version: 9.x
Excel Version: 200x
Location: Singapore

Re: TM1 coding extension for VSCode

Post by kangkc » Thu Jun 13, 2019 7:58 am

With the GIT support in PA 2.0.7, this may work.

Emixam
Posts: 39
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: TM1 10.2
Excel Version: 2016

Re: TM1 coding extension for VSCode

Post by Emixam » Mon Jun 17, 2019 6:51 pm

No it's not.

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 » Wed Jun 26, 2019 9:58 am

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: 39
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: TM1 10.2
Excel Version: 2016

Re: TM1 coding extension for VSCode

Post by Emixam » Wed Jun 26, 2019 12:17 pm

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 11850 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 » Fri Jun 28, 2019 7:05 am

Thanks Emixam,
You've made my day :-)
Regards,
Bob

Bakkone
Posts: 102
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 » Tue Aug 20, 2019 5:39 pm

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: 36
Joined: Fri Aug 09, 2019 10:11 am
OLAP Product: TM1 / TM1 Web / Perspectives
Version: Planning Analytics V2.0.8
Excel Version: Plus 2013

Re: TM1 coding extension for VSCode

Post by HighKeys » 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. :)

Emixam
Posts: 39
Joined: Tue May 21, 2019 3:33 pm
OLAP Product: TM1
Version: TM1 10.2
Excel Version: 2016

Re: TM1 coding extension for VSCode

Post by Emixam » Tue Sep 17, 2019 6:38 pm

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: 36
Joined: Fri Aug 09, 2019 10:11 am
OLAP Product: TM1 / TM1 Web / Perspectives
Version: Planning Analytics V2.0.8
Excel Version: Plus 2013

Re: TM1 coding extension for VSCode

Post by HighKeys » Thu Sep 19, 2019 9:39 am

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