Hi
Im posting a code here, im trying to set BIM pipe as like reference snip . can somebody help me to solve this problem.
Sub Main
Dim osm As AssemblyDocument = TryCast(ThisApplication.ActiveDocument, AssemblyDocument)
If osm IsNot Nothing Then
Dim oBIM As BIMComponent = osm.ComponentDefinition.BIMComponent
Dim oBimConnectors As BIMConnectors = oBIM.Connectors
' Prompt the user to select circular edges
Dim collGeo As ObjectCollection = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAllCircularEntities, "Select circular edges")
' Check if the user selected any edges
If collGeo.Count > 0 Then
' Assuming you have a defined oBimConnDef somewhere in your code.
' Correct this assumption based on your actual code.
Dim oBimConnDefNew As BIMConnectorDefinition = oBIM.Connectors.CreatePipeConnectorDefinition(collGeo, BIMConnectorShapeEnum.kCircularShapeConnector)
MsgBox("Connector type: " & oBimConnDefNew.ConnectorType.ToString())
' Adding the newly created connector definition to the BIM component's connectors.
oBimConnectors.Add(oBimConnDefNew)
Else
MsgBox("No circular edges selected.")
End If
Else
MsgBox("Active document is not an assembly document.")
End If
End Sub
![sureshrext_1-1711540427989.png sureshrext_1-1711540427989.png](/t5/image/serverpage/image-id/1342511i8318CDD54713D223/image-size/medium?v=v2&px=400)