Page 1 of 1
Create Rules
Posted: Sun Aug 03, 2008 4:58 pm
by Eric
I do not think it is possible, but here is hoping.
Is there a way to create rules for a cube via a TI Process?
Thought while asking question.....Maybe be creative with ASCII Output function?
Re: Create Rules
Posted: Sun Aug 03, 2008 6:14 pm
by Mike L
Mmm, metaprogramming. For automated rule construction, I think Excel is the thing.
Your TI could write ascii which Excel could open as an .xru and then compile. I would be more inclined to use VBA as the driver, rather than TI.
Re: Create Rules
Posted: Sun Aug 03, 2008 6:33 pm
by Michel Zijlema
Hi Eric,
I'm not entirely sure what you're looking for, but there is a TI function called "RuleLoadFromFile(Cube, TextFile);" that can add rules from a text file to a rules sheet (see reference guide on Turbo Integrator functions for this one).
Michel
Re: Create Rules
Posted: Sun Aug 03, 2008 6:51 pm
by Mike L
I forgot about RuleLoadFromFile. That avoids the Rube Goldberg I described. Still, if I were writing a program to parse rules and perform macro substitution, TI script would not be my first choice of languages. Good luck!
Re: Create Rules
Posted: Mon Aug 04, 2008 9:55 am
by David Usherwood
I agree with you about TI. Fortunately you don't have to use TI to create the rules - do it with anything (perl would be good) then just use RuleLoadFrom file to bring in the results.
But I have my doubts about the rule generation idea, mainly on the grounds of documentation/understanding. I have used it myself only to take the rules off temporarily while doing a very big slice copy - cut the time from 36 hours to about 30 minutes.
I find that if you think you need to write repetitive rules then rethinking the cube structure with another dimension can often eliminate the need - and you can document it!
Re: Create Rules
Posted: Mon Aug 04, 2008 12:45 pm
by Eric
I agree TI is not the way to go, but I have a client who has limited understanding of TM1 and I do not have access to the server and he only has acccess to the TM1 directory not the entire server & ohh yeah they do not want to restart the service. A few to many contraints, a TI script seems to be the best especially since I do not know perl (wish I did though, someday)
I think the RuleLoadFromFile(Cube, TextFile); Should work! Didn't see that in the help files. I should know better the documentation is always better than help even iif the documentation is lacking.
Re: Create Rules
Posted: Mon Aug 04, 2008 1:42 pm
by Martin Ryan
Does he have admin access?
Why don't you write the rule in Notepad, then just get him to paste it into the rules editor? Enough screen shots on how to open the editor should do the hand holding for him. Keeps everything simple.
Martin
Re: Create Rules
Posted: Mon Aug 04, 2008 2:20 pm
by Eric
Why don't you write the rule in Notepad
That is what I ended up doing this weekend and it worked fine. I was just wondering if there was another approach. They are fans on the "I only have to click execute on the process and it will all just work, right?" method so I try to accommodate.