Hello Aaron
As far as I know, there is no method/property to get the current sequence file. In fact, in the code you sent it seems that you are trying to typecast an Engine Object into a sequence file object. I believe this will not work.
There are a couple of ways to know if a sequence file is already loaded or not. You mention you have the Engine object so I assumed you are in the operator interface. In the OI, you are pretty much in the control of everything and the user will not be able to open a file if you don't call the Engine.GetSequenceFile Method. The idea is to modify your code to store the current sequence file name in a global variable or even store a reference to this sequence file object when you call the method above.
Then, anytime y
ou need to check if a sequence is loaded, you simply read this variable.
On the other hand when you call the Engine.ReleaseSequenceFile method you clear the global variable.
Roberto Piacentini
National Instruments
Applications Engineer
www.ni.com/support