The SupportingConnections method of CustomSupportDefinition class provides information specifying the components of the assembly that physically connect to the supporting input objects. The method is defined as shown below:
public override Collection<ConnectionInfo> SupportingConnections
{}
The method should return a collection of ConnectionInfo. The following example code shows a sample implementation of this method for the structural support assembly shown in Figure 2.
public override Collection<ConnectionInfo> SupportingConnections
{
get
{
try
{
//Create a collection to hold the ALL Structure
//connection information
int supportingObjects;
Collection<ConnectionInfo> structConnections = new Collection<ConnectionInfo>();
if (SupportHelper.PlacementType == PlacementType.PlaceByReference)
supportingObjects = 1;
else
supportingObjects = SupportHelper.SupportingObjects.Count;
if (topType == "ROD_WELDEDBEAMATT")
{
structConnections.Add(new ConnectionInfo(WBA, 1)); // partindex, routeindex
if (supportingObjects > 1)
structConnections.Add(new ConnectionInfo(WBA2, 2));
else
structConnections.Add(new ConnectionInfo(WBA2, 1));
}
else if (topType == "ROD_COLUMN_CLAMP")
{
structConnections.Add(new ConnectionInfo(COLUMN_CLAMP, 1));
if (supportingObjects > 1)
structConnections.Add(new ConnectionInfo(COLUMN_CLAMP2, 2));
else
structConnections.Add(new ConnectionInfo(COLUMN_CLAMP2, 1));
}
//Return the collection of Structure connection
//information.
return structConnections;
}
catch (Exception e)
{
Type myType = this.GetType();
CmnException e1 = new CmnException("Error in Get Struct Connections." + myType.Assembly.FullName + "," + myType.Namespace + "." + myType.Name + ". Error:" + e.Message, e);
throw e1;
}
}
}
The format of the returned collection of ConnectioInfo is identical to those returned in the SupportedConnections method described earlier. For example, the two ConnectionInfo returned in the earlier mentioned example correspond to the two parts physically touching the structural inputs, the column clamp and the beam clamp.