How Do I Pass a Predefined Value to an NI-SCOPE Property?

There are certain properties, such as trigger sources and trigger and event output terminals, that work with a set of predefined string values, but might also accept custom values. For example, the Source property specifies a ScopeDigitalEdgeStartTriggerSource object. You can configure Source using one of the predefined values, such as:
VB.NET

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = ScopeDigitalEdgeStartTriggerSource.Pfi0
C#

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = ScopeDigitalEdgeStartTriggerSource.Pfi0;
You can also create a custom value with the static FromString method.
VB.NET

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = ScopeDigitalEdgeStartTriggerSource.FromString("CustomSource")
C#

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = ScopeDigitalEdgeStartTriggerSource.FromString("CustomSource");
You can also directly set the source as a string instead of using the FromString method.
VB.NET

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = "CustomSource"
C#

scopeSession.Trigger.StartTrigger.DigitalEdge.Source = "CustomSource";

How Do I Get the Underlying String from Source or Output Terminal Value?

You can use the ToString method to retrieve the underlying source values. For example, the following code shows how to retrieve the source name:
VB.NET

Dim triggerSource As String = ScopeDigitalEdgeStartTriggerSource.Pfi0.ToString()
C#

string triggerSource = ScopeDigitalEdgeStartTriggerSource.Pfi0.ToString();

You can use the underlying string value to assign a source or output terminal to some other source or output terminal.