Cable Fill Calculations - Intergraph Smart 3D - Reference Data

Intergraph Smart 3D Electrical Reference Data

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

This is the preferred means of customizing the rules, as you do not need to deal with the implementation details of creating a new ActiveX COM component. Modifying any of the following methods in clsFillCalc.cls will serve the purpose of customizing the rules. CableTrayType.bas needs to be modified only when you have table-based rules similar to that of NEC.

Modify either of the following two fill methods in clsFillCalc.cls to customize the fill rules:

  • Fill Calculations for Cableway Features

    Private Sub IJDFillCalculations_GetCwayFillParams

  • Fill Calculations for Conduit Features

    Private Sub IJDFillCalculations_GetConduitFillParams

Data for Determining Fill Percentage

Fill percentage is the area occupied by all the cables, divided by the cable tray or conduit area. The following data is required for calculating the fill percentage:

  • Properties of the cableway feature such as width, depth, and area.

  • Number of cables passing through the feature.

  • Properties of each cable passing through the feature such as radius, area, and bend radius.

Modifying the Existing Project

This is the preferred means of customizing the rules, as you do not need to deal with the implementation details of creating a new ActiveX COM component. Modifying either of the following methods in clsFillCalc.cls will serve the purpose of customizing the rules. CableTrayType.bas needs to be modified only when you have table-based rules similar to that of NEC. The following are the methods that need to be overwritten:

  • Fill Calculations for Cableway Features

    Private Sub IJDFillCalculations_GetCwayFillParams

  • Fill Calculations for Conduit Features

    Private Sub IJDFillCalculations_GetConduitFillParams

Data Needed for Calculating Fill

In simple terms, Fill Percentage is nothing but the percentage of the area occupied by all the cables in a feature in comparison to that of the area of the feature. The following data is primarily required for calculating the fill:

  • Properties of the cableway feature like width, depth, and area.

  • Number of cables passing through the feature.

  • Properties of each cable passing through the feature like radius, area, and bend radius.

The means to get the above data is described below.

Getting Properties of the Cableway Feature (Width, Depth, Area)

The cableway feature is passed in as an input parameter to the method. If you notice, the first parameter coming in as input to IJDFillCalculations_GetCwayFillParams, pDispCableWayFeatObject is a cableway feature type object.

Cableway Feature with Parts (Cable Trays)

The part that is associated with the feature object contains the width and depth properties, making it necessary to get the part associated with the above feature in order obtain those properties.

You can use the below method to get the part from the passed in pDispCableWayFeatObject:

Private Function GetCablewayPartFromFeature(oCablewayfeature As Object) As IJCableTrayPart

Const METHODNAME = "GetCablewayPartFromFeature"

On Error GoTo ErrHandler

Dim oCableWayFeat As IJRtePathFeat

Dim oParent As IJDesignParent

Dim oChild As IJDesignChild

Dim oCableWayPart As IJCableTrayPart

Dim oCableTrayPartObj As IJPartOcc

Dim oCableway As IJRteCableway

Dim oCbleTrayFeat As IJRtePathFeat

Dim oCblwyPartCol As IJDObjectCollection

Dim oCblwyRun As IJRtePathRun

Dim oTempPart As IJDPart

Dim oCblPartObj As Object

Set oCableWayFeat = oCablewayfeature

Set oCblwyRun = oCableWayFeat.GetPathRun

Set oCblwyPartCol = oCblwyRun.GetParts

For Each oCblPartObj In oCblwyPartCol

If TypeOf oCblPartObj Is IJPartOcc Then

Set oCableTrayPartObj = oCblPartObj

oCableTrayPartObj.GetPart oTempPart

Set GetCablewayPartFromFeature = oTempPart

Exit For

End If

Next oCblPartObj

Exit Function

ErrHandler:

Set m_oServerError = m_oServerErrors.AddFromErr(Err, "Failed GetCablewayPartFromFeature ", METHODNAME, MODULE)

m_oServerError.Raise

End Function

For example, declare the part as:

Dim oCableWayPart as IJCableTrayPart

Set oCableWayPart = GetCablewayPartFromFeature(pDispCableWayFeatObject)

Now you have the part oCableWayPart.

Getting the Properties from the Part

Now that you have the part from the cableway feature, accessing the properties from the part is very simple. For example, m_intCableTray = oCableWayPart.TrayType.

dTempWidth = oCableWayPart.NominalWidth

dTempDepth = oCableWayPart.NominalDepth

The following is the complete list of properties that are available on the part:

.

Getting the Collection of Cables and their Properties from the Cableway Feature

Get the relationship interface from the cableway feature.

Set oIJDAssocRelation = pDispCableWayFeatObject

Get the collection of segments in relation to the Cableway feature.

Set oTargetObjCol = oIJDAssocRelation.CollectionRelations(IID_IJRtePathFeat, "Segment")

m_intCableCount = oTargetObjCol.Count

lNoCables = m_intCableCount

Browse through each item and get the Cablerun object from it.

For nLoop = 1 To m_intCableCount

Set oSegmentPathFeat = Nothing

Set oCableRun = Nothing

Set OCablePart = Nothing

Set oSegmentPathFeat = oTargetObjCol.Item(nLoop)

Getting the Cablerun:

Set oCableRun = oSegmentPathFeat.GetPathRun

Accessing the properties on the IJRteCableRun interface:

m_intSignalType = oCableRun.SignalType

Some of the properties are available on the cable part. Getting the cable part from the Cablerun:

Set OCablePart = oCableRun.GetSpecificCablePart

End loop

Next nLoop

The following is a list of properties that are available on the interface IJRteCableRun:

The following is a list of properties that are available on the interface IJCablePart:

Creating the New Project

Apart from modifying the existing project, you can create a new ActiveX .dll project and implement the rules, but under the following guidelines:

  • Make sure the project has the same ProgID cblFillCalculations.clsFillCalcs.

  • Make sure that the .vbp contains all the references as in cblFillCalculations.vbp.

  • Make sure the class clsFillCals implements the interfaces:

    • IJDFillCalculations

    • IJRteCARRealTimeFill