I want to Run a subassembly Ilogic rule from a top level, As well as making the rule wait before it runs so the form can update the parameters

I want to Run a subassembly Ilogic rule from a top level, As well as making the rule wait before it runs so the form can update the parameters

JamesMeBoi
Enthusiast Enthusiast
591 Views
3 Replies
Message 1 of 4

I want to Run a subassembly Ilogic rule from a top level, As well as making the rule wait before it runs so the form can update the parameters

JamesMeBoi
Enthusiast
Enthusiast

Here is what I am looking for help with, I have a sub-assembly in my top level that is tooling for the machine. The tooling is an sub-assembly that has a form inside it which accesses the parameters of the sub parts in the tooling assembly. Between the 3 tooling parts, all the parameters are the same for the dimensions, it is comprised of 1 gasket and 2 metal forms. 

 

Here is a break down of the current set up

 

Top Level: Rule

iLogicVb.RunRule("Tooling Assembly:1", "Tool Configuration")

 

Tooling Assembly(Sub Assembly) : Rule and Form

iLogicForm.Show("Tooling Configuration")

Parameter("BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Template Gasket Side:1", "BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Template:1", "BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Gasket Template:1", "BackplateThickness") = Parameter("BackplateThickness")

Parameter("ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Template Gasket Side:1", "ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Template:1", "ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Gasket Template:1", "ChevronAngle") = Parameter("ChevronAngle")

Parameter("ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Template:1", "ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Gasket Template:1", "ProductLength") = Parameter("ProductLength")

Parameter("ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Template:1", "ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Gasket Template:1", "ProductThickness") = Parameter("ProductThickness")

Parameter("ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Template:1", "ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Gasket Template:1", "ProductWidth") = Parameter("ProductWidth")

Parameter("SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Template Gasket Side:1", "SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Template:1", "SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Gasket Template:1", "SealSpacing") = Parameter("SealSpacing")

Parameter("SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Template Gasket Side:1", "SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Template:1", "SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Gasket Template:1", "SealWidth") = Parameter("SealWidth")

Parameter("TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Template Gasket Side:1", "TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Template:1", "TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Gasket Template:1", "TabLength") = Parameter("TabLength")

Parameter("TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Template Gasket Side:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Template:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Gasket Template:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")

Parameter("TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Template Gasket Side:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Template:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Gasket Template:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")

Parameter("GasketThickness") = Parameter("GasketThickness")
Parameter("Kanga Tooling Gasket Template:1", "GasketThickness") = Parameter("GasketThickness")

See Image attached

 

Parts: Parameters

See Image attached

592 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

 

public StillRunning as boolean

iLogicForm.Show("Tooling Configuration")

StillRunning = true

Parameter("BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Template Gasket Side:1", "BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Template:1", "BackplateThickness") = Parameter("BackplateThickness")
Parameter("Kanga Tooling Gasket Template:1", "BackplateThickness") = Parameter("BackplateThickness")

Parameter("ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Template Gasket Side:1", "ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Template:1", "ChevronAngle") = Parameter("ChevronAngle")
Parameter("Kanga Tooling Gasket Template:1", "ChevronAngle") = Parameter("ChevronAngle")

Parameter("ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Template:1", "ProductLength") = Parameter("ProductLength")
Parameter("Kanga Tooling Gasket Template:1", "ProductLength") = Parameter("ProductLength")

Parameter("ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Template:1", "ProductThickness") = Parameter("ProductThickness")
Parameter("Kanga Tooling Gasket Template:1", "ProductThickness") = Parameter("ProductThickness")

Parameter("ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Template Gasket Side:1", "ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Template:1", "ProductWidth") = Parameter("ProductWidth")
Parameter("Kanga Tooling Gasket Template:1", "ProductWidth") = Parameter("ProductWidth")

Parameter("SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Template Gasket Side:1", "SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Template:1", "SealSpacing") = Parameter("SealSpacing")
Parameter("Kanga Tooling Gasket Template:1", "SealSpacing") = Parameter("SealSpacing")

Parameter("SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Template Gasket Side:1", "SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Template:1", "SealWidth") = Parameter("SealWidth")
Parameter("Kanga Tooling Gasket Template:1", "SealWidth") = Parameter("SealWidth")

Parameter("TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Template Gasket Side:1", "TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Template:1", "TabLength") = Parameter("TabLength")
Parameter("Kanga Tooling Gasket Template:1", "TabLength") = Parameter("TabLength")

Parameter("TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Template Gasket Side:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Template:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")
Parameter("Kanga Tooling Gasket Template:1", "TopAndBottomPercentage") = Parameter("TopAndBottomPercentage")

Parameter("TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Template Gasket Side:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Template:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")
Parameter("Kanga Tooling Gasket Template:1", "TopAndBottomSpacing") = Parameter("TopAndBottomSpacing")

Parameter("GasketThickness") = Parameter("GasketThickness")
Parameter("Kanga Tooling Gasket Template:1", "GasketThickness") = Parameter("GasketThickness")

StillRunning = false

 

Public sub main

if stillrunning is false then

your code here

end if

 

end sub

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

Message 3 of 4

JamesMeBoi
Enthusiast
Enthusiast

Getting the error,

 

 

"Rule Compile Errors in Tool Configuration, in Tooling Assembly.iam

Error on Line 1 : 'Public' is not valid on a local variable declaration."

Message 4 of 4

Ralf_Krieg
Advisor
Advisor

Hello

 

Public variable declaration needs to be placed in class namespace.

Anyway, wouldn't it be enough to set the form option modal to true? The calling rule in main assembly call the rule "Tool Configuration" (and gives it control) in the sub assembly. This rule "Tool Configuration" opens the form. While your form is opened modal, the following code in rule "Tool Configuration" will not execute. Changing parameters within the form will apply to model. If you close the form, the code afterwards will execute. As long as your rule "Tool Configuration" in subassembly not finishes, the control won't get back to the calling rule in main assembly.

 

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes