Page 1 of 1

TI help

Posted: Mon Oct 15, 2012 11:57 am
by mincharug.shulft
Hello,
I have a dimension called “Region” which has 3 levels and
My structure got misplaced the Europe element came out of the German consolidated but Europe is there still in the German consolidation so I looked for other dimensions and like this I got it for 3 dimensions (misplaced) out of 200 dimensions so I plan to write the TI script to get the misplaced elements out of 200 dimensions so can you please help me someone what functions I should use here?.please refere the attached doc

Re: TI help

Posted: Tue Oct 16, 2012 12:18 am
by Alan Kirk
mincharug.shulft wrote: I have a dimension called “Region” which has 3 levels and
My structure got misplaced the Europe element came out of the German consolidated but Europe is there still in the German consolidation so I looked for other dimensions and like this I got it for 3 dimensions (misplaced) out of 200 dimensions so I plan to write the TI script to get the misplaced elements out of 200 dimensions so can you please help me someone what functions I should use here?.please refere the attached doc
Well, you've had 41 hits but no answers.

Somehow I doubt that's because nobody knows the answer.

I think that possibly the twin problems are:
(a) If "German" is a consolidation, I can't help thinking that "Europe" might be as well rather than being the N level element that you've shown it as being. (Meaning, in turn, that while that screen shot is a description of a problem it may not necessarily accurately reflect your problem); and
(b) You're a little light on the detail of which of these functions you have already tried. In particular the ones under the heading "Dimension Manipulation TurboIntegrator Functions".

Re: TI help

Posted: Tue Oct 16, 2012 12:50 am
by winsonlee
"Europe element came out of the German consolidated but Europe is there still in the German consolidation"

I wonder if it is possible to have an N element to be parentless at the same time N element is a parent of another element ?

If Europe is still in the German consolidation, after pressing on hierarchy sort you shouldnt see Europe hanging outside the consolidation.

Will your question be something like you would like to go through 200 dimensions to find out N elements that are parentless?

Re: TI help

Posted: Tue Oct 16, 2012 12:55 am
by Alan Kirk
winsonlee wrote: I wonder if it is possible to have an N element to be parentless at the same time N element is a parent of another element ?
My emphasis added.

If it is, I think that may be either one for the Bugs forum, or a revolutionary new way of creating quantum hierarchies.

Re: TI help

Posted: Tue Oct 16, 2012 6:16 am
by rmackenzie
mincharug.shulft wrote:I plan to write the TI script to get the misplaced elements out of 200 dimensions so can you please help me someone what functions I should use here?
To find out the number of parents an element has you should use ELPARN
To find out the type of the element you should us DTYPE

The TI code to bring it together is:

Code: Select all

sDimName = 'WHATEVER_YOUR_DIMENSION_NAME_IS';
sElementName = 'WHATEVER_ELEMENT_YOU_NEED_TO_CHECK'; 

nParentCount = ELPARN ( sDimName, sElementName );
sElementType = DTYPE ( sDimName, sElementName );

IF ( nParentCount = 0 & sElementType @= 'N' );
  # do stuff like an AsciiOutput
ENDIF;

Re: TI help

Posted: Tue Oct 16, 2012 8:00 am
by mincharug.shulft
Thanks to all,
again i have small correction in my first posted;the misplaced element is not there in the any of the consolidated structure and when i open that misplaced element the weight its not editable that means i understood misplaced elements are corrupted.here not sure why its been corrupted (this is other question).
and i am trying to write script which can check get the all elements(DIMSIZ) and check every element whether with in the given strucure (attached Doc) if any one of the element is not comes under predefined stracture so i am taking that as misplaced element.so is please correct this codition .thanks a lot again.
belement,ename are the run time parameter i am using here

ELISCOMP(belement,ename,'Region') =0 % ELISCOMP(belement,ename,'German') =0 % ELISCOMP(belement,ename,'America') =0 % ELISCOMP(belement,ename,'Brazil') =0 % ELISCOMP(belement,ename,'Gulf') =0

Re: TI help

Posted: Wed Oct 17, 2012 5:33 am
by Andy Key
In general, if you are looking at the element properties and you can't edit the weighting or change the element type, click on the element name on the left hand side of the properties window first.

Having said that, if Europe does not have any parents, then having a weighting of zero is not a problem and is in no way any indication that an element is corrupt. Weightings are only applied when adding elements together in a consolidation. As Europe doesn't have any parents weighting is completely irrelevant.

Re: TI help

Posted: Thu Oct 18, 2012 2:27 pm
by mincharug.shulft
Hi,

Here when i opened the element properties weight should be not editable.i did this test already.
so when you open the my attached screenshot; i want to get the elements whichever were misplaced outside my structure.can you please verify the below logic is it correct?
simply its checking for all the passing elements and whether its belongs to any one of the consolidation or nor ,if any one of element its not belngs to 5 consolidated( element2) then display/get that as the asciiout put is it correct? this Urgent help me all gentlemens

IF ( ELISCOMP(belement,ename,'Region') =0 % ELISCOMP(belement,ename,'German') =0 % ELISCOMP(belement,ename,'America') =0 % ELISCOMP(belement,ename,'Brazil') =0 % ELISCOMP(belement,ename,'Gulf') =0);
Asciioutput('test.txt',belement,ename);

Re: TI help

Posted: Fri Oct 19, 2012 2:15 am
by rmackenzie
mincharug.shulft wrote:i want to get the elements whichever were misplaced outside my structure.can you please verify the below logic is it correct?
simply its checking for all the passing elements and whether its belongs to any one of the consolidation or nor ,if any one of element its not belngs to 5 consolidated( element2) then display/get that as the asciiout put
mincharug.shulft wrote:IF ( ELISCOMP(belement,ename,'Region') =0 % ELISCOMP(belement,ename,'German') =0 % ELISCOMP(belement,ename,'America') =0 % ELISCOMP(belement,ename,'Brazil') =0 % ELISCOMP(belement,ename,'Gulf') =0);
Asciioutput('test.txt',belement,ename);
Reading your post, I am thinking that you want to output the elements that don't roll up to any of the consolidations. Also, I take it that an element that rolls up to 'America' won't roll up to 'Gulf'. In this case, I believe your logic is wrong because the OR-logic in the IF statement will lead to the output of an element because at least one condition will be true.

E.g. New York is not in Saudi Arabia, meaning that:
ELISCOMP ( belement, 'New York', 'Gulf' ) = 0 is true
ELISCOMP ( belement, 'New York', 'America' ) = 0 is false

So the IF statement evaluates to truth because there is at least one TRUE in there, but you wouldn't output New York because it is happily rolling upto 'America'.

Perhaps you need to be using the AND operator - & - this will trap elements that are not in any of your structures.

Code: Select all

IF ( ELISCOMP(belement,ename,'Region') =0 & ELISCOMP(belement,ename,'German') =0 & ELISCOMP(belement,ename,'America') =0 & ELISCOMP(belement,ename,'Brazil') =0 & ELISCOMP(belement,ename,'Gulf') =0); 
Asciioutput('test.txt',belement,ename);
I hope I understood the question properly.