Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

different versions of a Ilogic component

KenVaessen
Enthusiast

different versions of a Ilogic component

KenVaessen
Enthusiast
Enthusiast

Hello, I am working with differtent versions of 1 Ilogic component in an assembly. All parts that I replace with database parts works fine.

 

 

The problem is in the part that I need to change with a parameter. I have written the next rule. This is to calculate the height of a tube. The problem is that this origin part is the same for al versions and if a make a change in version 1  this also change in version 2.  

 

The ideal rule would be that inventor calculate the height "module_funderingsbuis_hoogte" that I need for this part.  Then make a part name HOL0101104125_L_162_mm. So where the height depends on the parameter 162 mm. Then he needs to check in de directory C drive Database Maurice\Onderdelen\Afvoer\Buis\Standpijp_Funderingsbuis if this part already exists . If yes then replace with this part. When no then create this part. Save it and replace with this part.

 

I hope you understand what I need and you can help me. Thanks in advance

0 Likes
Reply
306 Views
2 Replies
Replies (2)

KenVaessen
Enthusiast
Enthusiast

This is the code for the replacement and this works fine

 

SyntaxEditor Code Snippet

HOL0103206125 = "C:\Database Maurice\Onderdelen\Afvoer\Bocht\HOL0103206125.ipt"
HOL0103106125 = "C:\Database Maurice\Onderdelen\Afvoer\Bocht\HOL0103106125.ipt"
HOL0103292125 = "C:\Database Maurice\Onderdelen\Afvoer\Overschuifmof\HOL0103292125.ipt"
HOL0103603160 = "C:\Database Maurice\Onderdelen\Afvoer\Verloop\HOL0103603160.ipt"
HOL0103606500 = "C:\Database Maurice\Onderdelen\Afvoer\Knevelinlaat\HOL0103606500.ipt"
HOL0108670125 = "C:\Database Maurice\Onderdelen\Afvoer\Diverse\HOL0108670125.ipt"
HOL0101104125_L_124_mm = "C:\Database Maurice\Onderdelen\Afvoer\Buis\Standpijp_Koppelbuis\HOL0101104125_L_124_mm.ipt"

HOL0103206160 = "C:\Database Maurice\Onderdelen\Afvoer\Bocht\HOL0103206160.ipt"
HOL0103106160 = "C:\Database Maurice\Onderdelen\Afvoer\Bocht\HOL0103106160.ipt"
HOL0103292160 = "C:\Database Maurice\Onderdelen\Afvoer\Overschuifmof\HOL0103292160.ipt"
HOL0108670160 = "C:\Database Maurice\Onderdelen\Afvoer\Diverse\HOL0108670160.ipt"
HOL0101104160_L_146_mm = "C:\Database Maurice\Onderdelen\Afvoer\Buis\Standpijp_Koppelbuis\HOL0101104160_L_146_mm.ipt"

    If Parameter("module_standpijp_diameter") = 125 Then
        Component.Replace("Overschuifmof", HOL0103292125, True)
        Component.Replace("Ophangbeugel", HOL0108670125, True)
        Component.Replace("Standpijp_Koppelbuis", HOL0101104125_L_124_mm, True)
    ElseIf Parameter("module_standpijp_diameter") = 160 Then
        Component.Replace("Overschuifmof", HOL0103292160, True)
        Component.Replace("Ophangbeugel", HOL0108670160, True)
        Component.Replace("Standpijp_Koppelbuis", HOL0101104160_L_146_mm, True)
    End If
0 Likes

KenVaessen
Enthusiast
Enthusiast

This is to calculate the height of a tube. 

 

SyntaxEditor Code Snippet

Select Case Parameter("module_keuze_gebogen_recht") 
    Case 0 ul
        Select Case Parameter("module_standpijp_diameter")
            Case 125
                Select Case Parameter("module_afvoerbuis_diameter") 
                    Case 200
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 321 + module_mof_hoogte + 71)
                    Case 250
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 332 + module_mof_hoogte + 71)
                    Case 315
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 339 + module_mof_hoogte + 71)    
                    Case 400
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 344 + module_mof_hoogte + 71)
                    Case 500
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 467 + module_mof_hoogte + 71)
                End Select
            Case 160
                module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 388 + module_mof_hoogte + 77)
            End Select
    Case 1 ul
        Select Case Parameter("module_standpijp_diameter")
            Case 125
                Select Case Parameter("module_afvoerbuis_diameter") 
                    Case 200
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 10 + module_mof_hoogte + 71)
                    Case 250
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 21 + module_mof_hoogte + 71)
                    Case 315
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 28 + module_mof_hoogte + 71)    
                    Case 400
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 33 + module_mof_hoogte + 71)
                    Case 500
                        module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 156 + module_mof_hoogte + 71)
                End Select
            Case 160
                module_funderingsbuis_hoogte = (module_voet_hoogte + module_graafpeil) - (module_afvoerbuis_diameter + 30 + module_mof_hoogte + 77)
            End Select
    End Select

'Minimale Funderingspijp
If module_funderingsbuis_hoogte <=150 Then
MessageBox.Show("Niet mogelijk, selecteer ander graafpeil", "Waarschuwing")
End If

0 Likes