Page 1 of 1

C# programming for a Blackmagic Switcher

PostPosted: Fri Apr 06, 2018 10:42 am
by Mattias Henriksson
Hello.

I've tried tried finding the answer for this question through googling and thinking about it myself, but unfortunately I haven't been able to find an answer yet so I'm turning to you guys here at the forums.

I'm sorry this has already been asked before, in that case I was simply just not able to find the source for it and get the answer I was looking for.

I have created a simple control panel/application which connects to the switcher upon a button click. What I want to know/want to do after this point is "sending" a command to the switcher through this connection and program using another button click. I have read in the documents about using macros, but I find this very confusing and the procedure steps not clear enough to me. Is using macros the only way to perform operations on the switcher? Can I record macros completely through C# code or do I need to call IBMDSwitcherMacroControl::Record and then perform the macro commands on the actual switcher device?
I just simply want, completely through C# code to connect to the switcher, push a button to send a command/macro/whatever to the switcher and then the switcher performs sent command for me.

Again I'm sorry if my request and post seems messed up, but I'm really starting to tear my hair about this since I'm still a beginner in programming and working with the Blackmagic devices is only on request from my seniors.

Hopefully you guys can provide me with the information I'm looking for!

Best regards,

Mattias

Re: C# programming for a Blackmagic Switcher

PostPosted: Fri Apr 06, 2018 7:10 pm
by Xtreemtec
Why not start simple with a command to do CUT, or PGM = 3.. (I'm not into the command list of the BMD SDK ..) But i think it is better to start there instead of Macro's.. ;)

Re: C# programming for a Blackmagic Switcher

PostPosted: Fri Apr 06, 2018 8:11 pm
by Ian Morrish
Replace this.switcher with whatever your switcher object is that you do a .connect to. Index is the id of the macto. Macro 1 is 0...

IBMDSwitcherMacroControl switcherMacroControl = (IBMDSwitcherMacroControl)this.switcher;
switcherMacroControl.Run(index);