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: 

iLogic: Component Pattern in Assembly-file doesn't work

1 REPLY 1
Reply
Message 1 of 2
Anonymous
232 Views, 1 Reply

iLogic: Component Pattern in Assembly-file doesn't work

 

Hello, I am creating an assembly file where I can select different locks for the respective projects. But the number of spacers I have used a comoponent pattern. The horizontal distance and the number of horizontal I have indicated with a user parameter. These parameters are again used in the iLogic code. But now these parameters are not responding. Does anyone know how I can fix this so that the assembly works? I've added two screenshots of the Pattern component and the User parameter. Thanks in advance. Regards, Joop

 

 

 

 

 

Edit component Pattern.JPGParameters Assemblyfile.JPG

1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Below is the code for controlling the parameters. i'm trying to understand iLogic but i can't figure it out because i thought this should work.


The first rule (selection of code):

 

Case "DIN Links"

iLogicVb.RunRule("Slotkeuze")

PlaatOfPlankDikte = PlankOfPlaatVoorkant

ArrayBlokkenDinLinks = ((AantalBlokkenSlot) + (ArrayBlokkenPlaat))

AfstandAanslagDinLinks = ((ArrayBlokkenDinLinks) * (DikteAfstandblok))

Component.IsActive("Component Pattern Din Links:1") = True

Component.IsActive("1043_977_22") = True

Component.IsActive("1013_456_23") = True

 

The second rule is:

 

If PlaatOfPlankDikte = 0 Then
ArrayBlokkenPlaat = 0 ul

Else If PlaatOfPlankDikte > 1 And PlaatOfPlankDikte <= 5 Then
ArrayBlokkenPlaat = 1 ul

Else If PlaatOfPlankDikte > 5 And PlaatOfPlankDikte <= 10 Then
ArrayBlokkenPlaat = 2 ul

Else If PlaatOfPlankDikte >10 And PlaatOfPlankDikte <= 15 Then
ArrayBlokkenPlaat = 3 ul

Else If PlaatOfPlankDikte > 15 And PlaatOfPlankDikte <= 20 Then
ArrayBlokkenPlaat = 4 ul
MessageBox.Show("Indien nodig ter hoogte van tegensluiting uitsparing maken in plaat of plank!", "Melding")

 

Else If PlaatOfPlankDikte > 20 Then
MessageBox.Show("De afstand hart frame tot aan aanslag tegensluiting is te groot! Plaat of planken ter hoogte van tegensluiting uitsparen!", "Melding")

 

Parameter.UpdateAfterChange = True
RuleParametersOutput()
InventorVb.DocumentUpdate()
iLogicVb.UpdateWhenDone = True
End If

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

Post to forums  

Autodesk Design & Make Report