I'm trying WEB APIS, and tried to set current palette for operations, like deletion of a palette, or replace a palette, for example.
I know in a MACRO I can use this API
ActionScript.SetProperty("Palette.CurrentPaletteHandle", handle:"Location=Colours,2,2")
But how must I use this WEB API?
POST /titan/set/2/Palette/CurrentPaletteHandle
What must I send in the body? I have tried with titanId as a number, I have tried to put titanId in JSON format or location in JSON format, or the entier handle I get with handles API, and nothing works...
Somebody knows how to use this WEB API?
Thanks
How set CurrentPaletteHandle property with Web APIs?
Moderator: Moderators
-
- Posts: 7
- Joined: 13 Apr 2024, 14:36
-
- Posts: 1122
- Joined: 02 Jul 2010, 10:29
- Location: Siegen, Germany
- Contact:
Re: How set CurrentPaletteHandle property with Web APIs?
Not an answer but a solution:
In order to delete a palette by its usernumber you can do
Alas, in order to delete a palette by its location you can do
However I don't know if there is a significant functional difference between deleting a palette with DeleteCurrentPalette() and deleting the palette handle as suggested above.
In order to delete a palette by its usernumber you can do
Code: Select all
http://localhost:4430/titan/script/2/Handles/SetSourceFromUserNumber?handlePath=Handle.Palette&userNumber=20
http://localhost:4430/titan/script/2/Handles/ConfirmDelete
Alas, in order to delete a palette by its location you can do
Code: Select all
http://localhost:4430/titan/script/2/Handles/SetSourceHandleFromHandle?handle_location=Colours_1_5
http://localhost:4430/titan/script/2/Handles/ConfirmDelete
However I don't know if there is a significant functional difference between deleting a palette with DeleteCurrentPalette() and deleting the palette handle as suggested above.
-
- Posts: 1122
- Joined: 02 Jul 2010, 10:29
- Location: Siegen, Germany
- Contact:
Re: How set CurrentPaletteHandle property with Web APIs?
Courtesy of Greg: the answer to your question: in order to to set a palette as current and then delete it, by Web API, you can do
He also writes
Now it is up to you to decide which solution you prefer.
Code: Select all
http://localhost:4430/titan/script/2/ActionScript/SetProperty?id=Palette.CurrentPaletteHandle&value_handle=Location:Colours,1,1
http://localhost:4430/titan/script/2/Palette/DeleteCurrentPalette
He also writes
The short answer is that no it should not make any difference if you use DeleteCurrentPalette from the Palette namespace or deleting from the Handles namespace. They both end up using the same underlying function that both removes the handle and tells Titan to delete the underlying item in the engine.
Now it is up to you to decide which solution you prefer.
-
- Posts: 7
- Joined: 13 Apr 2024, 14:36
Re: How set CurrentPaletteHandle property with Web APIs?
Thanks a lot for your help
Who is online
Users browsing this forum: Google [Bot] and 3 guests