logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Bias89  
#1 Posted : Friday, March 7, 2025 3:26:38 AM(UTC)
Bias89

Rank: Newbie

Groups: Registered
Joined: 3/7/2025(UTC)
Posts: 3
Location: Germany

Hi,

I evaluate vMix, I created a title in the designer with multiple image placeholder and multiples textfields.
Now I am trying to change the images and the text via the API.

I am able to select the right text field via the selectedName parameter, but for the SetImage function, this parameter seems not to work. I am only able to change the first image in the title. Not the second and not the third.

Is there any reason why selectedName is noch working for SetImage function? Or is there another parameter for selecting the image?
doggy  
#2 Posted : Friday, March 7, 2025 4:26:21 AM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,351
Belgium
Location: Belgium

Thanks: 300 times
Was thanked: 989 time(s) in 821 post(s)
Originally Posted by: Bias89 Go to Quoted Post
Hi,

I evaluate vMix, I created a title in the designer with multiple image placeholder and multiples textfields.
Now I am trying to change the images and the text via the API.

I am able to select the right text field via the selectedName parameter, but for the SetImage function, this parameter seems not to work. I am only able to change the first image in the title. Not the second and not the third.

Is there any reason why selectedName is noch working for SetImage function? Or is there another parameter for selecting the image?


Code:
API.Function("SetImage",Input:="images.gtzip",SelectedName:="Image2.Source",Value:="D:\blabla.png")
Bias89  
#3 Posted : Friday, March 7, 2025 5:05:59 AM(UTC)
Bias89

Rank: Newbie

Groups: Registered
Joined: 3/7/2025(UTC)
Posts: 3
Location: Germany

Hi,

I already searched, but as I said I want to set the image path via API from an external solution.
Not via an internal script.

Simple example with API calls:

the setText function works as expected, this API Call sets a new text for the selected TextBlock1.text
http://127.0.0.1:8088/api/?Function=SetText&Input=test&SelectedName=TextBlock1.text&Value=Test

The SetImage function should work identically if I trust the documentation:
https://www.vmix.com/hel...utFunctionReference.html

But it doesn't:

This call does nothing:
http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/to/my/image/md.png&SelectedName=heim.source

This call changes the first image:
http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/to/my/image/md.png

It looks like the SelectedName property is not working for the SetImage function.
Of course, I created the titel via GT Designer and added Image placeholders.

Bias89  
#4 Posted : Friday, March 7, 2025 5:31:48 PM(UTC)
Bias89

Rank: Newbie

Groups: Registered
Joined: 3/7/2025(UTC)
Posts: 3
Location: Germany

Mhh also tried selectedValue but its not working too:

I have 2 images: heim.source and gast.source, only this call is changing a image:

http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/eb.png&SelectedValue=heim.source

This not:
http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/eb.png&SelectedValue=gast.source

But it's strange, the firsrt call wit SelectedValue=heim.source is changing the image for gast.source ^^
If I call wirh SelectedValue=gast.source nothing happens.

Both images are visible in the title editor.
doggy  
#5 Posted : Friday, March 7, 2025 5:56:22 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,351
Belgium
Location: Belgium

Thanks: 300 times
Was thanked: 989 time(s) in 821 post(s)
Originally Posted by: Bias89 Go to Quoted Post
Hi,

I already searched, but as I said I want to set the image path via API from an external solution.
Not via an internal script.

Simple example with API calls:

the setText function works as expected, this API Call sets a new text for the selected TextBlock1.text
http://127.0.0.1:8088/api/?Function=SetText&Input=test&SelectedName=TextBlock1.text&Value=Test

The SetImage function should work identically if I trust the documentation:
https://www.vmix.com/hel...utFunctionReference.html

But it doesn't:

This call does nothing:
http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/to/my/image/md.png&SelectedName=heim.source

This call changes the first image:
http://127.0.0.1:8088/api/?Function=SetImage&Input=test&Value=C:/path/to/my/image/md.png

It looks like the SelectedName property is not working for the SetImage function.
Of course, I created the titel via GT Designer and added Image placeholders.




pay attention to the use of capitals :Source instead of source
Also part of the link especially the value should be URL encoded

C:/path/to/my/image/md.png
should be C%3A%2Fpath%2Fto%2Fmy%2Fimage%2Fmd.png

see : https://forums.vmix.com/...Web-API-Script#post51481
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.