Accessing Scene Data 'Default' Property

Q and A about functionality and how to solve a special task for your application.

Accessing Scene Data 'Default' Property

Postby gaz99 » 04 May 2017, 17:12

Hello,

In Ventuz Designer every scene data external has a Default value property (In the Constraints Section). Is there a way from a script to access the value of this Default property for a given external? I know the externals themselves are accessible and settable from a script but can you access the other properties of an external that you see when in designer ?

I am trying to write a script that set's all scene data externals to their default value on startup.

Any help would be appreciated.

Cheers

Gaz
Gareth - Kinetic Pixel
gaz99
 
Posts: 11
Joined: 29 Nov 2016, 17:25

Re: Accessing Scene Data 'Default' Property

Postby gaz99 » 05 May 2017, 08:49

Mods, could this be moved to the Ventuz 5 section as that is where i meant to post it.

Cheers
Gareth - Kinetic Pixel
gaz99
 
Posts: 11
Joined: 29 Nov 2016, 17:25

Re: Accessing Scene Data 'Default' Property

Postby Eric_RD » 09 May 2017, 16:58

You can get the whole xml via
cluster.scenemodel(iid, async state) or cluster.scenemodel(identity,async state)
Code: Select all
        //
        // Zusammenfassung:
        //     Gets the SceneModel XML of a scene.
        //
        // Parameter:
        //   sceneIdentity:
        //     The scene identity (filename without extension) of the scene to query
        //
        //   asyncState:
        //     A user-defined object that qualifies or contains information about an asynchronous
        //     operation.
        //
        // Rückgabewerte:
        //     A task that represents the asynchronous operation.
        //
        // Ausnahmen:
        //   T:Ventuz.Remoting4.ServerException:
        //     InaccuratePersistentSceneModels if the scene models do not match each other
        //
        // Hinweise:
        //     All connected machines are queried for the SceneModel of the specified scene
        //     identity. Only if the returned XML of all machines is equal, an XML is returned
        //     to the caller. The scene model is read from the scene file - even if a scene
        //     with the same identity is already loaded into memory.
        public Task<string> SceneModel(string sceneIdentity, object asyncState);


        //
        // Zusammenfassung:
        //     Gets the SceneModel of an in-memory scene specified by iid.
        //
        // Parameter:
        //   iid:
        //     Ventuz.Remoting4.IID of the scene to receive the in-memory SceneModel
        //
        //   asyncState:
        //     A user-defined object that qualifies or contains information about an asynchronous
        //     operation.
        //
        // Rückgabewerte:
        //     A task that represents the asynchronous operation.
        //
        // Ausnahmen:
        //   T:Ventuz.Remoting4.ServerException:
        //     InaccurateSceneModels if the SceneModel of the connected machine are different.
        //
        // Hinweise:
        //     If the Ventuz.Remoting4.Cluster is connected to multiple machines and the returned
        //     XML differs an exception is thrown. The returned XML may differ from the persistent
        //     SceneModel if the scene has been modifified in memory (if the Ventuz.Remoting4.Cluster
        //     is connected to a Ventuz Designer for example)
        public Task<string> SceneModel(IID iid, object asyncState);

this can be parsed and casted to a dataModel type
http://www.ventuz.com/support/help/late ... ng4.netSDK
User avatar
Eric_RD
 
Posts: 56
Joined: 04 Jun 2014, 14:01


Return to How to

cron