Private Sub WritePositionsToModel(oBOMRows As BOMRowsEnumerator)
Try
Dim oRow As BOMRow
Dim oCompDef As ComponentDefinition
Dim sChildDess As String, sChildName As String
For i = 1 To oBOMRows.Count
Try
oRow = oBOMRows.Item(i)
oCompDef = oRow.ComponentDefinitions.Item(1) ' ссылка на ComponentDefinition данной строки
If TypeOf oCompDef Is VirtualComponentDefinition Then
sChildDess = Trim(UCase(oCompDef.PropertySets.Item("Design Tracking Properties").Item("Part Number").value))
sChildName = Trim(UCase(oCompDef.PropertySets.Item("Design Tracking Properties").Item("Description").value))
Else
sChildDess = Trim(UCase(oCompDef.Document.PropertySets.Item("Design Tracking Properties").Item("Part Number").value))
sChildName = Trim(UCase(oCompDef.Document.PropertySets.Item("Design Tracking Properties").Item("Description").value))
End If