-
Hello all, Best wishes for 2024 ! Would someone have an example of how to call in a normal, regular, Python script where I already use TM1py (successfully):
First, I have the need to suggest a unique object name. For instance, create a temporary dimension, use it, then destroy it again. What would the syntax be to call these functions ? Notably, the "self" parameter in the function. The other variables are straightforward. I am not sure how to use "self" and I get errors in VS Code. I am struggeling with "Imports" near the top of the script. Thanks a lot ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
ObjectService requires RestService to get instantiated. So, its not possible to directly use it. But, you can access those methods through
|
Beta Was this translation helpful? Give feedback.
-
Hello,
Many thanks! I will test asap and get back to you.
…------
Best regards / Beste groeten,
Wim Gielis
MS Excel MVP 2011-2014
https://www.wimgielis.com <http://www.wimgielis.be>
Op di 2 jan 2024 om 20:42 schreef Vinoth Kumar Ravi <
***@***.***>
ObjectService requires RestService to get instantiated. So, its not
possible to directly use it. But, you can access those methods through
CellService or ElementService or SecurityService as the ObjectService is
inherited in these services:
from TM1py.Services import TM1Service
credentials = {}
with TM1Service(**credentials) as tm1:
# To use the suggest_unique_object_name
print(tm1.cells.suggest_unique_object_name())
print(tm1.elements.suggest_unique_object_name())
print(tm1.security.suggest_unique_object_name())
# To use the determine_actual_object_name you have to pass the object_class and object_name
print(tm1.cells.determine_actual_object_name(object_class='Cubes', object_name='}CliEntGroupS'))
print(tm1.elements.determine_actual_object_name(object_class='Cubes', object_name='}CliEntGroupS'))
print(tm1.security.determine_actual_object_name(object_class='Cubes', object_name='}CliEntGroupS'))
—
Reply to this email directly, view it on GitHub
<#1005 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEDHULIU2VTTCV4Q7O4LZCLYMRPLBAVCNFSM6AAAAABBJL6F5KVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TSOJWGQYTQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
ObjectService requires RestService to get instantiated. So, its not possible to directly use it. But, you can access those methods through
CellService
orElementService
orSecurityService
as the ObjectService is inherited in these services: