Notepad++ 7.6 for TM1 process and Rules

Post Reply
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Hello,

1) How do I use/setup Notepad++ 7.6 to Edit and Save TI processes. I am not sure how to set up Notepad++ 7.6 for TM1 10.2.2. Its painful indenting TI with space bars in TM1 native editor.

2) Does IBM PA (latest version of TM1 have better editor for TI and Rules ?)

Thanks,

Rtel
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

Hello,

1) You can edit a PRO file straight away, but be very careful. TM1 keeps line numbers of parameters and code in the Prolog/Metadata/Data/Epilog tabs. If you change lines there, or you change parameters, you definitely have to update certain property values. Also, if a TI process also has a corresponding *.blb file, I would never change anything in the *.PRO file itself - always use the ugly TI editor there.
If you change *.PRO files manually, you need to bounce the TM1 model, to take the changes into account.

2) Yes, check out the video's on the website of IBM
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
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Hi Wim, thank you for the reply.

' You can edit a PRO file straight away'

Does it mean copy and paste, TI code in Notepad++
OR
set up Notepad by importing TM1 v10.1 update xml file ?

I do not know exact process how to set up Notepad++ to access TI and edit. I tried looking online where it has been suggested to import
'TM1 v10.1 update' xml file via view>User Defined Dialogue. But I cannot see those options in Notepad++ 7.6 and am not sure how this works.

Thanks
tomok
MVP
Posts: 2831
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Notepad++ 7.6 for TM1 process and Rules

Post by tomok »

The fact that you have to bounce the server in order to use any of the TI code changes you make in Notepad++ make it a non-starter for me. That negates any benefit you get from a better search and replace, etc. I haven't seen the new TI editor in PA but it can't possibly be worse than what has been in tool for the last 10/15 years.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

tomok wrote: Tue Dec 11, 2018 6:19 pm The fact that you have to bounce the server in order to use any of the TI code changes you make in Notepad++ make it a non-starter for me. That negates any benefit you get from a better search and replace, etc. I haven't seen the new TI editor in PA but it can't possibly be worse than what has been in tool for the last 10/15 years.
Hello Tom,

This TI code editing is mostly done in development, where I can see value of a quick restart. For example, after a find/replace action in all *.PRO files. In a production model or a model with lots of data, code editing becomes less of an issue. There, I would update *.PRO files, copy them in the TM1 data directory and a planned (weekly) restart would take the files into the model after a couple of days.

Wim
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
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

Rtel,

There is a language add-on for TM1 (in fact, there are a couple of them).
In Notepad++, go to Language > Define your language and import such an XML file.
After the restart of Notepad++ the new language will be available.
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
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Notepad++ 7.6 for TM1 process and Rules

Post by lotsaram »

If you were to do a internet search for "planning analytics ultimate developer tool" you may find some other alternatives.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
babytiger
Posts: 78
Joined: Wed Jul 31, 2013 4:32 am
OLAP Product: Cognos TM1, EP, Analyst
Version: 10.2.2
Excel Version: 2013
Location: Sydney AU

Re: Notepad++ 7.6 for TM1 process and Rules

Post by babytiger »

Rtel wrote: Tue Dec 11, 2018 4:37 pm Hello,

1) How do I use/setup Notepad++ 7.6 to Edit and Save TI processes. I am not sure how to set up Notepad++ 7.6 for TM1 10.2.2. Its painful indenting TI with space bars in TM1 native editor.

2) Does IBM PA (latest version of TM1 have better editor for TI and Rules ?)

Thanks,

Rtel
If your main concern is the indentation, then I would suggest:
1. manually copying the code out the ugly TI editor, and paste to Notepad++,
2. make your changes (including indentation), and
3. copy from notepad++ and paste back into the "ugly" TI editor.

This way:
1. you won't have to worry about updating the line references for each tab.
2. your code is validated by the TI editor (including the datasource you've specified) before saving.
3. don't worry about corrupting anything else in the pro file.

No matter what add-ins you've included in your notepad++, it will not validate your code.
MK
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Notepad++ 7.6 for TM1 process and Rules

Post by gtonkin »

Rtel wrote: Tue Dec 11, 2018 4:37 pm ...
1) How do I use/setup Notepad++ 7.6 to Edit and Save TI processes. I am not sure how to set up Notepad++ 7.6 for TM1 10.2.2. Its painful indenting TI with space bars in TM1 native editor.
...
If you are looking to indent in TI, try Ctrl+i
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Thank you everyone for your suggestions !

Following is my learning.

1) I have copied most common TI functions in a Notepad++ file and I use it as a starting template to develop the TI code. This way it at least helps me not make spelling mistakes. Not perfect but better then nothing.

2) Copy paste TI script from Notepad to TI editor for compiling the code.

3) Ctrl + i is very helpful in indentation.

4) Following any brackets (TI or Rules) is much more easier in Notepad++

5) Eagerly waiting for next upgrade to IBM PA for better TI writing experience.

Happy Holidays !
bgregs
Posts: 77
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Re: Notepad++ 7.6 for TM1 process and Rules

Post by bgregs »

Great summary! For the sake of sharing, my personal preference is to edit rules and TIs using VIM :o

You'd be surprised how powerful it can be. Delete everything inside the parenthesis (or brackets, quotes, etc.) using 3 characters "d+i+*char*". But yes, notepad++ does have better syntax highlighting (at least until I get done finishing mine for VIM ;)).
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Notepad++ 7.6 for TM1 process and Rules

Post by gtonkin »

+1 for VIM - I use it too, especially when editing the .pro files directly.
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

Rtel wrote: Fri Dec 21, 2018 3:35 pm1) I have copied most common TI functions in a Notepad++ file and I use it as a starting template to develop the TI code. This way it at least helps me not make spelling mistakes. Not perfect but better then nothing.
Why don't you use the autocomplete feature in Notepad++, whereby functions can be suggested as you type along ? The functions that are presented are looked up against a file that you can create/maintain yourself.
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
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

I am using Notepad++ (a lot), VIM is new to me. Can someone highlight the main differences, i.e. where VIM would have an additional and clear benefit over Notepad++ ? I might not switch over completely but use the right tool for a given task 8-)
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
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Wim Gielis wrote: Fri Dec 21, 2018 7:28 pm I am using Notepad++ (a lot), VIM is new to me. Can someone highlight the main differences, i.e. where VIM would have an additional and clear benefit over Notepad++ ? I might not switch over completely but use the right tool for a given task 8-)
Hi, Thanks for the suggestion.

1) I have copied these functions in Notepad++ and they appear in a pop up menu while I am Typing. But please let me know how do I set up Autocomplete while pointing to an external file that have all functions list ?

2 ) I started to build macro that renders basic code. Couple of eg. are as follows. Please let me know if there are better ways then this.

Thanks


#--------------
IF ( );

ELSEIF();

ELSE;

ENDIF;
#------------------
svDimensionName = '';
IF (DimensionExists (svDimensionName) = 0);

ELSEIF;
DimensionCreate (svDimensionName);
ENDIF;
#---------------
Wim Gielis
MVP
Posts: 3103
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: Notepad++ 7.6 for TM1 process and Rules

Post by Wim Gielis »

1) Here's information on Auto completion in Notepad++: http://docs.notepad-plus-plus.org/index ... Completion
The idea is to have an xml file named after the language addon (like TM1) and store it in a folder like: "C:\Program Files\Notepad++\plugins\APIs" (depending on where you installed the software). That file should obey a certain XML-like structure and contain the keywords that you would like to autocomplete (Notepad++ suggesting the full keyword once you start typing it).

2) Cubewise has a free tool based on the automatisation tool AutoHotKey. You can get it from here.
https://code.cubewise.com/ti-helper
If you update the text files that are in the directory, you should have the same result as now, but easier. Make your own code snippets and you will see your efficiency increase.
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
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Hello Wim, Thank you for sharing. A great deal of information on the links you provided. I have configured the Autocomplete option of Notepad++ as suggested.

This is the line from the instruction page on first link:
"The AutoComplete files are located in the "plugins\APIs" folder, to be found in the Notepad++ Install Folder, most often C:\Program Files\Notepad++."

1) I do not see any 'API' folder on path C:\Users\UserID\AppData\Roaming\Notepad++\plugins on my machine. Should it be there after I install Notepad 7.6 or I have to create it manually.

2) What is the name of xml file that I should be looking for to insert the words and or functions for auto completion? Should there be one individual language specific XML file under API folder ?

3) I have a config.xml file on path C:\Users\USerID\AppData\Roaming\Notepad++
I added following in config.xml and tried changing values of tags different way but no luck.
---------------------------------------------------------
<AutoComplete language="C++">
<Environment ignoreCase="no" startFunc="(" stopFunc=")" paramSeparator="," terminal=";" additionalWordChar = "."/>
<KeyWord name="abs" func="yes">
<Overload retVal="int" descr="Returns absolute value of given integer">
<Param name="int number" />
</Overload>
</KeyWord>
</AutoComplete>
----------------------------------------------------------

I appreciate all the help, comments and suggestions !
Rtel
Posts: 59
Joined: Tue Nov 13, 2018 10:15 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013

Re: Notepad++ 7.6 for TM1 process and Rules

Post by Rtel »

Hi All, I am sorry I was looking at the wrong path for the API folder. It was pointing to INI files instead of config file.

I did find API folder and I found instructions to create and add language specific xml files from the following link.

https://notepad-plus-plus.org/community ... anguage/10

I will be continuing my exercise creating custom xml file/s.

Thanks
Post Reply