Page 1 of 1
TM1 API: evoking subset editor screen
Posted: Wed Jun 13, 2012 10:10 pm
by fcapell
Hi Everyone!
I have a C# Application and I need to provide a way for the user select a dimension element.
Is there a way to evoke the TM1 subset editor screen from a C# application?
Thanks,
Fausto
Re: TM1 API: evoking subset editor screen
Posted: Thu Jun 14, 2012 6:47 am
by winsonlee
Have you tried the following code?
mySubsets = myServer.Dimensions[dimension_name].PublicSubsets;
sSubset = mySubsets[subset_name];
Re: TM1 API: evoking subset editor screen
Posted: Thu Jun 14, 2012 12:43 pm
by Harvey
Hi Fausto.
I work with the API a lot, and I seriously doubt it. There may be a way to hack into the COM dlls in the TM1 program folder, but it's certainly not a supported behavior.
I would suggest writing a dialog in your application that contains a .NET TreeView control and populating that with the dimension elements you wish to select from. If the dimension is particularly large, you'll need to make sure you implement some sort of paging.
This is really how the API is intended to be used. It does not contain any UI elements, just provides you with access to read and modify all the data structures in the TM1 server.
I have written a full subset editor in C# in the past and it is complex, but not too hard if it's read-only.
Good luck!