Axis iLogic Rules

Axis iLogic Rules

harrisons22K9B
Enthusiast Enthusiast
925 Views
6 Replies
Message 1 of 7

Axis iLogic Rules

harrisons22K9B
Enthusiast
Enthusiast

Quick summary.  I'm working on making a Configurator, for two options of products.  For sake of size, and the issue being the same,  I simplified down the models.  The Goal is to have Product A or Product B aligned on the Y-axis at one time.  However being new to this software I have an issue with the iLogic and activating Axis Mates. 

In the models and screen shot, I want to Align the Cube or the Prism with the Goal Ring.

 

In the grand scale, I have a skeleton file as a base containing all the needed variables for the assembly file, and linking the form for the text variable, I can select the desired object to have 0 offset from the Y-axis. 

 

With "All On" as my default state, If I Run the Form Rule to open the Skeleton Form, and Select Cube, then with some updates, the Cube is aligned on the Y-axis.  From the same starting point, if I select Prism, the triangular Prism is aligned on the Y-axis.  BUT If I start with the Cube Aligned, and need to go to the Prism Option (because of supply or design changes later down the line) the Cube and Prism align overtop of each other, as opposed to the non-selected one jumping back to it's starting position.

 

The Question:

Does anyone know why? and what I am missing in the code?  Commented Code is appreciated.

 

Extra:
People will notice I have a Custom Case.  I left in the Custom Option as in the larger Configurator, Custom moves things visually for us Engineers/Designers to signify the need to tweak dimension, or maybe build something new.  I would assume the code is similar, but if it is not and much harder, just say so.  I can always work on a different solution.

 

Thanks for all the help.
-Harrison

0 Likes
Accepted solutions (1)
926 Views
6 Replies
Replies (6)
Message 2 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @harrisons22K9B 

 

I didn't understand some of the intent concerning the skeleton model, etc. So I simplified things and took some guesses. 

 

In any case, here is a working version, where it is all run from the top level assembly. This would be the more typical way to do this sort of thing. But again, I might have misunderstood the intent. This should still give you some ideas on the code.

 

See attached Inv 2022 files

 

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

 

 

 

EESignature

0 Likes
Message 3 of 7

harrisons22K9B
Enthusiast
Enthusiast

This kind of helps in showing me more code, but I need to link it from the skeleton model.  
My understanding, and someone can correct me if I am wrong, is that a skeleton model is helpful in building a framework to link parameters where if one parameter changes, you change that in the skeleton and it will auto update across x number of models that reference it, as opposed to changing that parameter in x number of models.  

In this example, I just simplified the issue as I'm still learning iLogic. 


As for what is provided.  If that is the "standard" way, that's good to know, but I would like to not rename d# dimensions, and instead create User Parameters to set Cube Offset = d4 = 10 in.

 

Is that clearer?  Do I need to explain more?

Message 4 of 7

Curtis_Waguespack
Consultant
Consultant

Hi @harrisons22K9B,

 

Skeletal modeling is a "bottom up" approach that allows you to control all the design parameters in one file, at the bottom of the design: in the skeleton file.

 

iLogic is typically a "top down" approach where we use rules to control all the design parameters in one file, at the top of the design: the top level assembly.

 

This top down approach would be the most common approach for doing this with iLogic, but iLogic can work with a bottom down approach if needed. However, using that approach generally doesn't offer any advantage when we start using iLogic.

 

In the original example there was no information being used in the part components, so there wasn't any "pushing" of information into the components, but in the updated attached example I've added a user parameter called Size to show how we'd typically do this with iLogic. The end result, both from bottom up or top down is the same.

 

As for the parameter naming, if you prefer you can use User Parameters to drive the constraint offsets parameters d4 and d5  as shown in this example. The code would still reference and update the parameters named CubeOffset and PrismOffset.

 

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

 

 

 

 

EESignature

0 Likes
Message 5 of 7

harrisons22K9B
Enthusiast
Enthusiast

"This top down approach would be the most common approach for doing this with iLogic, but iLogic can work with a bottom down approach if needed. However, using that approach generally doesn't offer any advantage when we start using iLogic."
@Curtis_Waguespack can you elaborate on when it would be advantageous?  Also thanks for the help thus far, and don't feel like you need to do another version from the info below.  I thought this would have been a "heresthecommand.youremissing" or 'explanation of usethiscodestring over what you have.

---
As for the newer response, it is helpful-ish in defining bottom up/top down, but doesn't answer my questions. However, that's on me for not being clearer.

 

Size isn't the issue, it is snapping to y-axis.

The cube and prism are just stand ins for much more complex screw conveyors and airlocks.  
So the main skeleton part I have has the different planes where screws and airlocks need to mated to, and I have different sizes offset a distance from that Y-axis.

I may have over simplified my model with just doing a cube, prism, and ring in the 20 minutes I had this morning, but thought it would be easier than shrinkwrapping (simplifying) and figuring out what I could share in that time.

 

So to control what snaps where:
I need the controls to be in the Assembly?  or the Skeleton? (if it can be either, then pick the level 101 class version)
To make it run from the skeleton, do I need a Cube Axis and a Prism Axis as stand alone axes?

Ultimately, I need to have a skeleton part.  But at this point, I just want it working, and then I can iterate later.

 

Thanks.

0 Likes
Message 6 of 7

Curtis_Waguespack
Consultant
Consultant
Accepted solution

Hi @harrisons22K9B,

 

I added the Size parameter stuff, just as an example of the typical top down approach of pushing design parameters. So if that's not of interest, feel free to ignore that.

 

I just had a look at your original assembly, and what is unclear to me is that your skeleton model is not being used by the parts. Typically a skeleton model is derived into other parts to supply the link for updating and driving geometry from the skeleton. 

 


@harrisons22K9B wrote:

So to control what snaps where:
I need the controls to be in the Assembly?  or the Skeleton? (if it can be either, then pick the level 101 class version)

It could be either, but I think the controls would be best at the assembly. And "in the assembly" would be the "101 class version"
To make it run from the skeleton, do I need a Cube Axis and a Prism Axis as stand alone axes?
To make it from the skeleton, you would create everything you need in the skeleton and then create "derived parts" from that file and model the Cube and Prism around the derived geometry. You could then push values from the assembly into the skeleton, which pushes updates to the cube and prism parts.


I think the goal is something like this in pseudo-code :

 

If selection is Prism then,

     snap Prism to center of ring

     unsuppress Prism 

     suppress Cube

else If selection is Cube then 

     snap Cube to center of ring

     unsuppress Cube

     suppress Prism

else If selection is All On then

     Set Cube and Prism to default offset values

     unsuppress Cube

     unsuppress Prism

else If selection is Custom then

     Set Cube and Prism to some other offset value

     unsuppress Cube

     unsuppress Prism

 

If that is correct, then both of my previous examples are accomplishing that.

 

If not, then I'm still unclear. So maybe if you could write your version of the pseudo-code, that might be helpful.

 

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

EESignature

0 Likes
Message 7 of 7

harrisons22K9B
Enthusiast
Enthusiast

from taking a few hours, to dissect the examples provide, I've gotten it working and have a slightly better understanding of what needs to be in which level.  Thanks for the help on this!

 

(now onto the next problem of activating hole patterns...)

0 Likes