Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BIM Create pipe connection in inventor ilogic

0 REPLIES 0
Reply
Message 1 of 1
suresh.r.ext
87 Views, 0 Replies

BIM Create pipe connection in inventor ilogic

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

 

Tags (3)
Labels (6)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report