cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an automated way to toggle between constraint sets without using Family Tables?

SOLVED

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

Thank you Tom and Paul!

I have been able to combine to motor driven mechanism analyses and constraint sets to get exactly what I need.

I created the top level assembly parameters as yes/no type that say what the overall state is.

I created component level IF relations to drive the appropriate constraint set based on the top level assy parameters.

Now I just set my top level assy parameter to the correct state and regenerate to move the components to their correct location.

Then I go into Mechanism and run the appropriate analysis. Then I open the Snapshots dialog box (drag components) and update the Snapshot for that state.

The total time is now down to 1-2 minutes from ~5-10 mins.

I might also be able to get rid of the mechanism portion altogether and not have to deal with the touchiness of Mechanism.

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

Ok, So I thought I would try to apply this technique throughout my assy and replace the finicky Motor Driven Analyses.

I can't seem to get sub assy level constraint sets to switch at the parent assy level. For instance, I have a hinge assy that I have 2 constraint sets defined with relations to drive them. I have made it flexible. But since the constraint set I am using in this assy is a bolted connection, that doesn't help.

I tried defining a subassy level parameter and use that to drive the constraint set. It works at the standalone level.

I made the subassy flexible and added the parameter to the flexible items. I  then added a relation to the parent assy to drive the subassy parameter (not optimum as if there were numerous instances of this assy, I may want them opened or closed independently).

The relation is:

IF FSPAP_FLIP_EXTENDED == YES

EXTENDED:FID_24412= "YES"

ELSE

EXTENDED:FID_24412= "NO"

ENDIF

And the parameter updates:

But the position of the hinge does not.

Can anyone help with why this is behaving this way?

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

I'm not sure, but I found that when I wanted to write assembly or component level relations involving flexible components that go more than 1 level deep, then I had to use "associated parameters", which are parameters that are bound to the flexible component instance and available for controlling at the parent-assembly level.

Please read up on this, this is how they are defined (their access is hidden by default and a column needs to be added to the varied item table):

ASSOCIATED_PARAMETERS.png

So keeping the figure above in mind, suppose this MCMASTER_91290A318.PRT is being assembled and made flexible and ends up with FID of 24412.

Now suppose I want to change the value of the HARDNESS parameter for this component with an assembly level relation:  The code you listed is analogous to doing this:

HARDNESS:FID_24412 = "Rc60"

This would seem to be the logical way, and it would be accepted without immediate errors - but usually warnings about flexible var dims being re-set would start showing up in your message logs and you'd in general get weird results.

The correct way is to control the value of the HARDNESS parameter for this component by changing the value of the associated parameter "COMP1_HARDNESS":

COMP1_HARDNESS:FID_24412 = "Rc60"

That's the way I taught myself; I don't know why it works like that, but try and see if it works for you.

Highlighted

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

Hi Paul,

Thanks again for the help. You were correct. The way I got it to work in my situation is add the "Associated Parameter" to the definition of the Hinge Assy. I had to create unique parameter names for each instance of the Hinge Assy. I used LEFT_FLIP_EXTENDED & LEFT_FLIP_EXTENDED_2 for the 2 hinges.

Then I added the following relations to the top level assy relations:

IF FSPAP_FLIP_EXTENDED == YES

LEFT_FLIP_EXTENDED:FID_24412= "YES"

ELSE

LEFT_FLIP_EXTENDED:FID_24412= "NO"

ENDIF

IF FSPAP_FLIP_EXTENDED == YES

LEFT_FLIP_EXTENDED_2:FID_24413= "YES"

ELSE

LEFT_FLIP_EXTENDED_2:FID_24413= "NO"

ENDIF

So that worked, but I am very hesitant to utilize this technique. It will require too many relations at too many levels. And having to add a hidden column that has very little documentation as to how it works means that very few other users would be able too maintain this model.

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

Yes, no arguments from me about misgivings of this technique and that hidden column is also just baffling.

Just two more cents:

  - you don't have to have a unique parameter name for every flexible instance; in your case, the associated parameter could have been called "LEFT_FLIP_EXTENDED" in every instance, and relations would read: LEFT_FLIP_EXTENDED:FID_24413 = ....

  -  in general, using relations in your models means that other users are not able to maintain it effectively unless you document it with comments / annotations, etc...

Re: Is there an automated way to toggle between constraint sets without using Family Tables?

You can also steer parameters without relations or family tables.

Add the column "PTC_CONSTRAINT_SET" in a simplified rep and bob's your uncle 🙂.

The column can be added in the same way as you would add a column to the model tree.

 

 
Announcements