iLogic and Patterns

iLogic and Patterns

Anonymous
Not applicable
2,237 Views
4 Replies
Message 1 of 5

iLogic and Patterns

Anonymous
Not applicable

Happy Hump-day all!

    So I've started my most challenging iLogic program to date. I'm driving a trailer floor assembly length. (in 2' increments) Some of it has been pretty easy, but driving a pattern while trying to suppress different elements at the same time is giving me an error message. As the floor assembly model gets longer, the cross member pattern must grow as well, no problem there. The starting pattern has 15 occurrences. As I drive the model in 2' increments, I have to turn on occurrence 10 and suppress occurrence 16. The problem is 16 has just been created and hasn't been seen yet by iLogic, so I get this error : ( Component: The component named "CA-411341-94.25:16" was not found. ) It allows me to continue but when I check the assembly model (which now has CA-411341-94.25:16 ) and is not suppressed. If I regenerate the rule, the part suppresses. Here is offending code:

 

 

If AD_Floor_Length = 24 ft Then
Parameter("Crossmember_pattern") = 17
Parameter("AD22 Front Floor:1", "Length") = 72.000 in
Parameter("AD22 Rear Floor:1", "Length") = 216.000 in
Front_floor_mate = 0.000 in
Component.IsActive("AD22 Mid Floor:1") = False
Parameter("CA-502999-264-CS:1", "Length") = 288.000 in
Parameter("CA-502999-264-RS:1", "Length") = 288.000 in
Parameter("411331-264-CS:1", "Length") = 286.750 in
Parameter("411331-264-RS:1", "Length") = 286.750 in
Gusset_Pattern = 9

Component.IsActive("CA-411341-94.25:15") = True
Component.IsActive("CA-411341-94.25:16") = False
Component.IsActive("AD22 Mid Floor:1") = False

End If

 I've moved the "Crossmember Pattern" to the top of this section of code, but still get the error. Is the something I can insert in this section to allow the pattern to fully generate before it tries to suppress the new occurrence?

 

 

Thanks in advance for all your help.

 

 

Frank

0 Likes
Accepted solutions (1)
2,238 Views
4 Replies
Replies (4)
Message 2 of 5

Curtis_Waguespack
Consultant
Consultant

Hi frank,

 

I think the most straight forward solution is to do the suppressing in a 2nd rule.

 

Then at the end of rule 1, use a line like this:

 

iLogicVb.RunRule("Awesome_Suppressor_Rule")

 

You'll have to try this, post back if it doesn't work.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 3 of 5

Anonymous
Not applicable

Curtis,

    Thanks for the speedy response. Not sure I understand your solution. I get no errors when I'm done modifying my code. The error happens when I open the form and select what length floor I want. I dismiss the error box and rerun the rule (highlight, right click, rerun) and the suppression then happens. Right now this code is 257 lines long and I have more I want this to do. As follows: I will use this floor for both regular and barn door tail gates. For barn door gate option, I will be suppressing cuts in both rub rails and both manual and air locking components. For any of the regular tail gate options, I will be suppressing the parts for the manual tail gate if air locking is selected or the air lock parts if the manual option is selected. All of this will be driven by one form. Not sure if any of this means anything to you, but it is all key to what I need to do.

   So my question is this, is there a way to insure the pattern generates completely before the element suppression takes place without running another rule.

If you would need to see the entire rule, contact me privately and I will attach it to an e-mail. (frank@summittrailer.com)

   For what it's worth, when all this is done, I hope to drive a complete assembly model of the trailer body from the complete model, which would include the floor, both sides, the bulkhead and the tail gate models. The side, bulkhead and tail gate models also have a height element driven. Each of the sub assemblies have rules that drive them now. The sides are driven for both length and height, the tail gate and bulkhead are height only, but all have to work from the completed assembly model. I know I'm not there yet, but sorting this out now, I'm sure, will simplify things when I get to the next stage of this project.

   Again, thanks for you help.

 

Frank

0 Likes
Message 4 of 5

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi frank,

 

You can try adding these lines before the lines that do the suppressing (i.e. IsAcitve), so that the code updates in step.

 

RuleParametersOutput()
InventorVb.DocumentUpdate()

 

 

But my earlier suggestion was to break the rule into two rules, and run them consecutively.

 

Basically, rule one sets the parameters and updates the model, then rule 2 suppresses stuff.

 

I think right now the rule in trying to do things concurrently.

 

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

EESignature

Message 5 of 5

Anonymous
Not applicable

Curtis,

 

You Da Man!

 

Everything is now working perfectly. This phase is now complete. I inserted the code you gave me into mine immediately after the section the changes the cross member pattern in each section and checked all my different length options from 22' to 48' and smooth as silk. Thank you. With the help I'm getting from this forum I am getting where I need to be. I will be posting a video of the floor later today under the topic "What are you doing with iLogic".

 

Thanks again for your help and have a great day!

 

Frank