SmartComponent - Identify embedded SmartComponent

Hi there,

I am using a SmartComponent “A” including an embedded SmartComponent “B” from ABB Library.
I want to change the property binding between “A” and “B”. To do that, I need to identify the embedded SmartComponent “B”.

Unfortunately, the following code does not work since “targetObjectName” seems to be wrong defined. Can anyone give me a push into the right direction?

if (changedSignal.Name == “Active” && changedSignal.Value.ToString() == “0”)
{
string sourceObjectName = component.Name;
string targetObjectName = “GraphicSwitch”;
Station station = (Station)component.ContainingProject;

ProjectObject sourceObject = null;
sourceObject = station.FindObjects(obj => obj.Name == sourceObjectName, obj => true)?.FirstOrDefault();
ProjectObject targetObject = null;
targetObject = station.FindObjects(obj => obj.Name == targetObjectName, obj => true)?.FirstOrDefault();
PropertyBinding propBindHigh = new PropertyBinding(sourceObject, “PartHigh”, targetObject, “PartHigh”);
PropertyBinding propBindLow = new PropertyBinding(sourceObject, “PartLow”, targetObject, “PartLow”);

station.Bindings.Remove(propBindHigh);
station.Bindings.Remove(propBindLow);

}