Page 1 of 1
Excel file in Applications folder
Posted: Thu Sep 13, 2012 7:59 am
by vamp
Is there are any way to show excel blob (TM1BlobCreate), which saved in "}Applications", in Applications folder of Architect? Which of tm1api functions need to be used?
Thanks for reply!
Re: Excel file in Applications folder
Posted: Thu Sep 13, 2012 8:21 am
by Ricky Marwan
Check TM1FolderEntries
Re: Excel file in Applications folder
Posted: Thu Sep 13, 2012 8:36 am
by vamp
using TM1FolderEntries() function - I can get only contents of any folder of }Applications, but I didn't need this.
Code: Select all
var serverFolder = TM1ObjectPropertyGet(Pool, Server, TM1ServerFolder());
var count = TM1ObjectListCountGet(Pool, User, serverFolder, TM1FolderEntries());
// listing of files and directory contents below
I need to put blob,
which would be visible in Architect
Re: Excel file in Applications folder
Posted: Thu Sep 13, 2012 10:07 am
by Ricky Marwan
clear now, need to put blob
the first thing you need to get TM1EntryReference followed by URLHandle of entry reference
open the blob, use filestream to read block of bytes and use Blob put to store bytes
finally blob close
Re: Excel file in Applications folder
Posted: Thu Sep 13, 2012 10:14 am
by vamp
You almost right, but:
I create blob using TM1BlobCreate(), I can read & write any data, but I can't see created blob/file using Achitect application.
Re: Excel file in Applications folder
Posted: Tue Sep 18, 2012 1:51 pm
by vamp
What about TM1FolderEntryAdd function? Anyone used it?
Re: Excel file in Applications folder
Posted: Wed Sep 19, 2012 9:41 am
by vamp
I've just debugged tm1a.exe application and found that TM1FolderEntryAdd called after add File/add Reference-menu item click:
http://d.pr/i/ewIJ
Does anyone know TM1FolderEntryAdd signature?

Re: Excel file in Applications folder
Posted: Thu Sep 20, 2012 7:14 pm
by Mike Cowie
Hi Vamp:
I don't think the TM1 Application components of the TM1 API are officially documented which, when that happens, usually means that:
- They haven't gotten around to documenting them officially yet
- They think there's a chance they'll change the implementation/functions and don't want to publish them right now
If you think you need them for the purposes of what you're trying to do then I would reach out to IBM, make a case for why you need them and tell them you understand that what they give you is subject to change. Someone else may have a copy of the declarations for these functions, but it might be good to get it from the source.
Hopefully they will officially document these soon given application folders have been around for ages!
Regards,
Mike
Re: Excel file in Applications folder
Posted: Tue Sep 25, 2012 8:19 pm
by Marcus Scherer
an approach through the backdoor would be the following: you already determined/created
- the xls file in }Externals folder
- the blob with parameter entry ENTRYNAME/ENTRYTYPE/ENTRYREFERENCE
- the path to it in the }Applications folder
you could insert a new element (folder\blob name) in the }ApplicationEntries dimension and hierarchy with the API.
The drawback is that it requires a server restart to make the xls file accessible in Architect.
Re: Excel file in Applications folder
Posted: Tue Sep 25, 2012 8:26 pm
by vamp
now I've successfully created copy of folder-object using TM1ObjectDuplicate (I think that I can duplicate any file entry) , after - register it using TM1ObjectRegister and folder appears in Architect