User Tools

Site Tools


macros:identifier:usernumber

Types/Object/Handle

userNumber

Within Titan, each and every single item which you program has a number - simply an integer number, which you, within reason, can assign freely. In most cases, this is either not conciously used at all, or used in a user-specific system (e.g. group #1 might be the front truss or a specific group of fixtures…). The userNumber can be used to refer to a specific item. Unlike the titanId which is unique in a global scope (i.e. per show there can only be one item with a specific titanId), the userNumber is unique only in its context (e.g. fixtures, groups, palettes, playbacks, macros etc.): there can only be one fixture with the number 1 - any subsequently patched fixture will be given another userNumber. But there may also exist group 1, palette 1, or playback 1.

userNumber is a positive integer value.

Usually the userNumber is passed like this:

userNumber:2

“chaseHandleUN=10555”

“playbackHandleUN=10555”

Internally there is some parsing/'educated guessing' performed, depending from the very function the usernumber is sent to. There is a nice explanation in the forum here http://forum.avolites.com/viewtopic.php?f=20&t=5576:

The text string should match the type of the handle you are wanting to access. So in theory you should use cueHandle, chaseHandle and cuelistHandle dependent on the type of playback you are using. In this case the user numbers are shared by all three types so will probably work however may have side effects in other cases. There is also a generic playbackHandle that can be used for all three types.

Also note that for functions that explicitly require a parameter of type handle such as SetSourceHandleFromHandle you do not need to prefix the string with handle: as it will be automatically converted.

See another example for the use of “workspaceHandleUN=5” here: http://forum.avolites.com/viewtopic.php?f=20&t=5768

And another hint: casting doesn't work inside code blocks, see http://forum.avolites.com/viewtopic.php?f=20&t=5783:

It appears that you cannot use the cast operator within a statement block. It tries to get the function being called but cannot find it inside the statement block.

See Playback - Record and set userNumber for an example about recording a playback and then setting its usernumber.

As an IEnumarable cannot be set in a macro it is not (as of Titan 11) possible to select multiple playbacks by their usernumber, see http://forum.avolites.com/viewtopic.php?f=20&t=5787

Technically, this syntax looks like https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments: you have to name the argument 'userNumber', and after a colon give the value.

ASSUMPTION

It is a reasonable assumption that Acwusernumber also refers to userNumber, but in the context of the value being given in the appropriate menu.
used in
You could leave a comment if you were logged in.
macros/identifier/usernumber.txt · Last modified: 2018/09/09 20:50 by icke_siegen