Hey, could you perhaps share what you figured out to get it to work? I've been playing with a similar script; the intention of mine is to go through a list of take IDs separated by commas and export all of them as videos, but it only "successfully" exports the first one--"successfully" because I think the engine remains in "export" mode, and while the video will technically work it won't play until I've first closed out of XPression, and when I do close XPression after exporting I'm given an error message:
"Access violation at address 0000000000943D3B in module 'XPression.exe'. Read of address 0000000000000010."
After I close out of XPression the video works fine so I've at least gotten that far. I saw events like "OnFinished" and "OnProgress" listed in the SDK but don't know how to call those within the XPression scripting environment [assuming I can; a lot of scripting I've just learned on the fly]. Any help on this front would be greatly appreciated! Here's my script for reference [set to OnOnline for the scene]:
dim exportItems, presetPath, exportPath as xpTextObject
self.getObjectByName("Export Take IDs (separated by commas)", exportItems)
self.getObjectByName("Export Path", exportPath)
self.getObjectByName("Preset Path", presetPath)
dim takeIDList as string() = Split(exportItems.text, ",")
dim sequence as xpSequencer = engine.Sequencer
dim item as xpTakeItem
dim filePath as string
engine.VideoExport.LoadProfile(presetPath.text)
for index as integer = 0 to (takeIDList.length-1)
sequence.getTakeItemByID(takeIDList(index), item)
filePath = exportPath.text & takeIDList(index) & ".avi"
engine.VideoExport.RenderTakeItem(item, filePath, "ERROR")
next
------------------------------
-David O.
------------------------------
Original Message:
Sent: 05-26-2023 13:32
From: Sørensen
Subject: Exporting video from Xpression via API
Well, I've got it now. Thanks for the file, it was helpful after all.
------------------------------
Poul Erik
Original Message:
Sent: 05-26-2023 12:47
From: Garner
Subject: Exporting video from Xpression via API
Sorry, this is the only example I have.
Original Message:
Sent: 05-26-2023 12:44
From: Sørensen
Subject: Exporting video from Xpression via API
Hi Garner
Thanks for the file. The example is in C# - I tried my best to translate to VB, but i'm not able to make it work. Do you have the VB version at hand?
------------------------------
Poul Erik
Original Message:
Sent: 05-26-2023 11:38
From: Garner
Subject: Exporting video from Xpression via API
Attached is an example VB app for rendering take items.
Original Message:
Sent: 05-26-2023 10:56
From: Sørensen
Subject: Exporting video from Xpression via API
I'm trying to Export a video from the sequencer, I've had no luck so far. Can anyone give me a hint, my VB is below.
Dim engine As New xpEngine
Dim VE As New xpVideoExport
Dim TakeItem As New xpTakeItem
If engine.Sequencer.GetTakeItemByID(2905, TakeItem) Then
'TakeItem.Cue()
'TakeItem.Execute()
VE.LoadProfile("Profile.xprof")
VE.RenderTakeItem(TakeItem, "test.avi", "test_error")
End If
------------------------------
Poul Erik
------------------------------