Graphics

 View Only
  • 1.  How to use the OnSceneState event

    Posted 11-26-2015 09:17
    I create a scene group and with the API I add a couple of scenes with a text line as a crawl. I start the crawl.

    When the first line disapears off screen I see an event triggered of OnSceneState with State == 1.

    I asume at this point I can change that scene, but can I also delete the scene from the group?

    (And add another, new scene in stead)

    I ask this because in my case I might need a scene of another layout at that time.

    Or is it best to remove the text layer from the scene and add (an)other object(s) programatically?

    Will XPression wait with taking this scene online again (asume it is needed already) until the event has finished?


  • 2.  RE: How to use the OnSceneState event

    Posted 11-26-2015 15:20
    Here is a sample that may help (its in VB though, not C#)

    https://ross.brickftp.com/f/8d59b0ef2

    The scene will be automatically removed from the scene group after it crawls offscreen. At that point you can edit the data and re-add it back into the scene group if you wish.

    #XPression


  • 3.  RE: How to use the OnSceneState event

    Posted 11-27-2015 09:27
    Thanks for the beautiful example!

    There were some fionts missing, but it works anyway.

    Also I had to change some code to make it work, the default for parameter AsCopy from GetSceneByname is False, and the scenes should be a copy. So I had to change all GetSceneByName("Line1", TickerLine1) to GetSceneByName("Line1", TickerLine1, True).

    #XPression


  • 4.  RE: How to use the OnSceneState event

    Posted 11-27-2015 16:10
    Hi Barend,

    The documented default for AsCopy is supposed to be True. In my experience it always has been as well.

    You are using C# correct? You aren't using some other language such as Python where the default parameters don't carry over correctly?



    #XPression


  • 5.  RE: How to use the OnSceneState event

    Posted 11-29-2015 21:26
    I hope I'm not being rude, but in the C# API 6.1.0.3437, and used with Visual Studio Professional 2015 the default of AsCopy for either GetSceneByName and GetSceneByID is False.

    I am not using Python here.



    #XPression


  • 6.  RE: How to use the OnSceneState event

    Posted 11-30-2015 19:27
    Thats really weird.. I am using the same build 6.1 3437 but with Visual Studio 2010 instead. Here is what mine shows when examining the IxpEngine object.



    #XPression


  • 7.  RE: How to use the OnSceneState event

    Posted 11-30-2015 19:32
    I tried Visual Studio 2013 as well (don't have 2015 on my machine), and it also shows a default of true.. I'm not sure why 2015 would change the default to false.

    Can you clarify how you are adding the reference to your project; are you importing the XPression Bluebox COM library, or using the XPression .NET dll instead?

    #XPression


  • 8.  RE: How to use the OnSceneState event

    Posted 12-03-2015 05:48
    I have XPression Developer V6.1 installed and add a reference in my Visual Studio project from the

    C:/Program Files (x86)/XPressionDeveloper/net

    folder. Perhaps that is the reason, because I don't have an XPression reference, only xpression.net and xptoolslib.net

    #XPression