If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
I am trying to figure out how to push the Browser CEF Snapshot button through template wizard. This is the command in the commands window "FUNCTION*BrowserCEF*snap" but how do i push that button from template wizard?
I have done it like this for a previewsnapshot in another template. You can change the code but its a method of the same procedure. In the scene I added a script on a font and a controltext on top of that.In the ControlText InputValue I added the text SNA; \\Mypath\MyFolder\Snapshot. If at some point it says SNAP in the textbox it will run a function called snapMe. and then set the text back to blank.
Code:
sub OnInit()
This.Geometry.RegisterTextChangedCallback()
end sub
sub OnGeometryChanged(geom As Geometry)
snapMe()
end sub
Sub snapMe()
dim snapPath as Array[string]
this.geometry.text.split(";", snapPath)
if snapPath[0] = "SNAP" then
system.sendCommand("RENDERER SNAPSHOT " & snapPath[1] )
end if
end sub
In templatewizard i have a textbox called txtSnapPath holding the target destination folder and a button called btnSnapshot with an onclick event for the doSnap. Then in the script I have the following code
Code:
'---------------SNAPSHOT FUNKTION-------------
dim preview_render
preview_render = "MyPreviewEngineIPAddress"
sub doSnap(Sender)
dim mins
mins = Minute(Now())
if Len(mins) = 1 then
mins = "0" & mins
end if
txtSnapScriptTrigger.Text = "SNAP;" & txtSnapPath.text & "\_BarChart_" & Hour(Now()) &"_" & mins & ".png RGB 1920 1080"
SnapShow(Sender)
end sub
Sub SnapShow(Sender)
dim SnapFolder
SnapFolder = "" & txtSnapPath.text & ""
dim objWSH
Set objWSH = createObject("WScript.Shell")
objWSH.Run SnapFolder
Set objWSH = Nothing
scSnap.text = ""
End Sub
'---------------END SNAPSHOT FUNKTION-------------
I got it working. I can save the browser to a folder from TW. I would like to save it to Viz One instead of a folder so it eliminates a step for the producer. I can't seem to connect to Viz One though. I can see and drop images manually in the Viz One import folder but not from the plugin. Could be a network issue but just need some advice on that.
Ok so everything works at my artist station but not on the pilot test page through the preview server. I have the IP for the preview server but its not acting the same as it does when Artist is the preview server. Is there something different that needs to be done to get a snapshot from the preview server?
Another question: Is the Snap button supposed to Snap the image or just open the location of where the image is? When I hit it it just opens up the folder.
The entire setup here is based on a normal preview in the ActiveX. This Preview is what I snap and save to a folder, The preview engine only does frames not run scripts etc so make sure directors are lined up as intended when it makes the snapshot. Thats probably the reason for the different behaviour. Try to go to the console of your preview server and do a send RENDERER*TREE*$MyContainerHoldingCEF*FUNCTION*BrowserCEF*snap just to see if it understands what to do.
In the snapMe scriptpart of the scene, it just sends the snapshot command to the engine if the text says SNAP.Its just a trigger.
Code:
if snapPath[0] = "SNAP" then
system.sendCommand("RENDERER SNAPSHOT " & snapPath[1] )
end if
The ShowSnap part of the template code is where it opens the folder with the saved image, so if it hasnt made the snapshot correctly it will still just open the folder for you. You can always just disable that ShowSnap if you dont want it to open. It was a help for our weather people so they didnt have to browse around for the saved images.
Ok so I was able to save the images to the preview server computer itself in a folder but cant seem to get it to Viz One. It is a network folder and the password is set so it does not require one. But cant send to the Viz One import folder. Is there some syntax that is needed to save to a network folder?
Hi Lars,
Ok so i finally got what i needed. I made a networked drive to point to the Viz One folder. Then Enabled Linking in the preview server so that it could see the networked drive. Once that happened i was able to get the browser plugin using your Snap in the scene to get a snapshot from the browser to Viz One. Thanks for all your help!!!!!
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment