Parts Method - Intergraph Smart 3D - Reference Data

Intergraph Smart 3D Hangers and Supports Reference Data

Language
English
Product
Intergraph Smart 3D
Subproduct
Hangers and Supports
Search by Category
Reference Data
Smart 3D Version
11 (2016)

The Parts method of the CustomSupportDefinition class is responsible for specifying the catalog parts constituting the assembly. The method is defined as:

public override Collection<PartInfo> Parts

{ get { } }

The method should return a collection of PartInfo. The following example shows a sample implementation of this method for the hanger support assembly shown in Figure 1.

In the following example, the code that appears in italicized text is only included to illustrate how to use the CSD to add implied parts.

public class RodHanger : CustomSupportDefinition

{

private bool includeTurnbuckle = false;

private string pipeClampClass = "";

private string PIPECLAMP = "PIPECLAMP";

private string BOTEYENUT = "BOTEYENUT";

private string TOPEYENUT = "TOPEYENUT";

private string BOTROD = "BOTROD";

private string TOPROD = "TOPROD";

private string TURNBUCKLE = "TURNBUCKLE";

private string WBA = "WBA";

public override Collection<PartInfo> Parts

{

get

{

try

{

Ingr.SP3D.Support.Middle.Support support = SupportHelper.Support;

BusinessObject part = support.GetRelationship("OccAssyHasPart", "OccAssyHasPart_Part").TargetObjects[0];

includeTurnbuckle = (bool)((Boolean)((PropertyValueBoolean)support.GetPropertyValue("IJUATR_IncTurnbuckle", "IncludeTurbuckle")).PropValue);

pipeClampClass = (string)((String)((PropertyValueString)part.GetPropertyValue("IJUATR_ClampClass", "PipeClampClass")).PropValue);

Collection<PartInfo> parts = new Collection<PartInfo>();

parts.Add(new PartInfo(PIPECLAMP, pipeClampClass));

parts.Add(new PartInfo(BOTEYENUT, "BPCmp 5130-1"));

parts.Add(new PartInfo(BOTROD, "BPCmp 5000-1"));

if (includeTurnbuckle)

{

parts.Add(new PartInfo(TURNBUCKLE, "BPCmp 5100_6-1"));

parts.Add(new PartInfo(TOPROD, "BPCmp 5000-1"));

}

parts.Add(new PartInfo(TOPEYENUT, "BPCmp 5130-1"));

parts.Add(new PartInfo(WBA, "BPCmp 1047Type2-1"));

return parts;

}

catch (Exception e)

{

Type myType = this.GetType();

CmnException e1 = new CmnException("Error in Get Assembly Catalog Parts." + myType.Assembly.FullName + "," + myType.Namespace + "." + myType.Name + ". Error:" + e.Message, e);

throw e1;

}

}

}

}

Figure 1: Hanger Support with Associated Ports and Joints