Original Message:
Sent: 05-21-2025 14:44
From: Jeff Mayer
Subject: Querying bounding boxes via scripting
Since you're using the OnBeforeOnline event, the script will have knowledge of the FramebufferIndex and Layer. You can use those values get the current scene already in that layer.
Here's a script I've used to fetch the text object of the online scene, no matter its name:
'Get Scene on OutputDim FB as xpOutputFrameBufferDim OnlineScene as xpSceneEngine.GetOutputFrameBuffer(FramebufferIndex,FB)FB.GetSceneOnLayer(Layer,OnlineScene)'Get Online Scene's Bar Group and L3 TextDim OnlineText as xpTextObjectOnlineScene.GetObjectByName("Text1",OnlineText)
------------------------------
Jeff Mayer
Ross Video
Original Message:
Sent: 05-21-2025 12:46
From: Victor Alexis
Subject: Querying bounding boxes via scripting
That worked perfectly, thank you!
I'm now moving on to another step and just hit another wall if you'd be so kind to share some thoughts as well.
I have two different scenes set on transition logic to use a specific in/out scene director with a matching condition.
That said, I'm creating keyframes using both scene's OnBeforeOnline using the width of the bounding boxes to define start/end keyframes.
I would love to be able to fetch the first scene's Text.BoundingBox.Width and use that to set the initial keyframes of the incoming second scene. I'm struggling to be find a way to reach the first scene, given that it could be a lot of options and can't necessarily lock a scene name to the script.
I can maybe illustrate what I'm trying to achieve better if that's not clear.
Thanks once again!
------------------------------
Victor Alexis
São Paulo Brazil
Original Message:
Sent: 05-21-2025 09:49
From: Jeff Mayer
Subject: Querying bounding boxes via scripting
The xpBoundingBox object has Height, Depth and Width members, so the property you'd be looking for would be BoundingBox.width.
You can also use OnlineBoundingBox.width to return the same value as WidthScaled when you're using word wrap, auto squeeze, etc.. This matches the BoundingBox.WidthScaled property in Visual logic.
For your script, you shouldn't need the "num as double" variable. You can use query.OnlineBoundingBox.width wherever you'd need that value as a double.
------------------------------
Jeff Mayer
Ross Video
Original Message:
Sent: 05-20-2025 18:16
From: Victor Alexis
Subject: Querying bounding boxes via scripting
Hello there!
I'm trying to fetch a text object's Bounding Box Width through the scripting interface.
Currently, I'm circumventing that using Visual Logic by plugging that to a dummy text object called "test". But I want to avoid making those dummy texts for a type of data that I think I should be able to get from the scripting interface itself.

I saw a "dispatch interface" on the documentation named IxpBoundingBox that may be a part of the puzzle, but I have no idea how to approach it. This is what I got so far:

The highlighted line is where the code dies, even though it compiles.
Thanks in advance!
------------------------------
Victor Alexis
São Paulo Brazil
------------------------------