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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to make an assembly "static" and be able to reuse it multiple times?

Sandy1
10-Marble

How to make an assembly "static" and be able to reuse it multiple times?

Hi all,

Would really appreciate if someone can shed some light on this.

 

  1. Created an assembly in Creo Parametric 5, called it STATIC.asm (has A.prt and B.prt with A and B being FULLY constraint with one another)
  2. Created an assembly, called it RANDOM1.asm (has subassembly STATIC.asm in it)
  3. Created another assembly, called it RANDOM2.asm (also has subassembly STATIC.asm in it)
  4. Now the problem. When I opened RANDOM1.asm and break constraint between A.prt and B.prt in the subassembly STATIC.asm (break the constraint and move A and B apart), this action is automatically reflected in both RADOM2.asm and STATIC.asm. (i.e A.prt and B.prt are no longer constraint and are now pulled apart in both RANDOM2 and STATIC.asm)
  5. Is there a way, to break the constraint between A.prt and B.prt in RANDOM1.asm and still keep both STATIC.asm and RANDOM2.asm intact? I’m only 3 months new to CAD, so please try to keep explanation simple if possible.

Thank you

ACCEPTED SOLUTION

Accepted Solutions
BrianMartin
12-Amethyst
(To:Sandy1)

Hi Sandy...

 

I've read through the thread but didn't have a chance to jump in. I can think of two or three ways to do what you're asking - but the most direct method would be to use flexibility. I realize you've tried that - but you are missing a critical piece of information. I am not making a judgment on whether or not you should use this technique. Most experienced users would question why you'd need to have one assembly with differing constraints. If you're trying to simulate something that moves - such as a hinge - a mechanism constraint would be much better. But, I'll leave those topics alone for the moment to provide an answer for your question.

 

The key is the parameter PTC_CONSTRAINT_SET which controls which constraint is "active" for any two items assembled together. This is an often forgotten parameter which is not typically displayed. The value of this parameter is a string containing the constraint set name. 

 

To explain, each constraint set has a name. You can see it on the Placement Tab during the operation to assemble a new component. You can change the name by typing a new one into the Set Name field as shown below.

 

constraint sets.png

You can create more than one constraint set if you wish. You can name each differently and determine which one is "active" by checking/unchecking the Set Enabled option. See below for commands to add new sets and enable/disable:

set enable.png

 

For my example, I am using the model shown below as my "static.asm". The default location for the pin in the cube will be location "X". I'm going to create separate constraints for the pin in all the other locations, too. Here's the model:

default cube model.png

 

After creating and naming 5 sets of constraints (one for each pin location A, B, C, D, and X), the constraint screen looks like this:

Constraint D Active.png

 

So now you have ONE assembly with 5 potential positions for the pin. You can now place this assembly within multiple other assemblies - and vary the pin position using Flexibility. There's a trick to it - but once you see it, it's very easy. There are a couple of ways to achieve the same result. I'm detailing just one method here.

 

Assemble your static.asm into a higher assembly as you normally would. Right-click the model in the model tree and select Make Flexible. From the Varied Items screen, select the Parameters tab. Add a new parameter using the "+" as shown below:

make flexible param.png

 

Here's where the trick comes in - to see PTC_CONSTRAINT_SET, you must change the parameter filter from Default to Current and Sub Features as shown below:

add_parameter.png

Find PTC_Constraint_Set and add it to the varied items list using the Insert Selected button. Change the New Value field to a different constraint name. It helps if you've named your constraints something memorable so they're easier to understand at this step.

 

Apply New Constraint.png

You can repeat this process as many times as you wish. For my example, I assembled 5 static.asm models and changed the constraint active for each. Here's the final result:

results.png

 

One final caveat - as with most things in Creo, there are many ways to achieve the same (or a similar) result. To become truly proficient, you'll need to learn the pros and cons of each option. Over time, you'll be able to evaluate the subtle trade-offs between each technique and choose the right one for your specific application. 

 

Hopefully this gives you enough details to solve the problem. Good luck!!

 

Best regards,

-Brian

View solution in original post

9 REPLIES 9
kdirth
21-Topaz I
(To:Sandy1)

The short answer is NO.  STATIC.asm is an individual assembly that will always have the same constraints in every assembly.

 

There are other functions that may be able to create the state that you are looking for.

 

You can make STATIC.asm flexible in an assembly.  Flexability allows you to vary dimensions, features, components, and more.

 

If you are looking for an exploded view of STATIC.asm, use the view manager Explode tab to create an exploded state.

 


There is always more to learn in Creo.
Sandy1
10-Marble
(To:kdirth)

Thank you for your response kdirth.

 

I have opened RANDOM.asm and made the subassembly STATIC.asm as flexible as you suggested. But there is no option to break or vary constraint between A.prt and B.prt. As you said, I can change dimensions, features,components, parameters but not constraint.

 

Thank you

I think your choice of words "STATIC" is a little bit confusing, because I am assuming that you are trying to design a certain "flexibility".  I suppose your design intent is that sub-components A/B should be "together", but their relative placement depends on the context.  If that's the case, you could try building your STATIC.ASM model so that B is constrained with a general 6-DOF connection:

Definition of B component in the TEST_STATIC.ASM- general placement (not yet "finalized")Definition of B component in the TEST_STATIC.ASM- general placement (not yet "finalized")

 

This scheme allows component B to be "finalized" with respect to the parent assembly by specifying 2 general connections.  Also note that each instance of TEST_STATIC can be placed differently :

"Finalizing" the configuration of an instance of "TEST_STATIC.ASM""Finalizing" the configuration of an instance of "TEST_STATIC.ASM"

 

Sandy1
10-Marble
(To:pausob)

Thank you pausob for your response

 

I will definitely look into the 6DOF constraint. I didnt know of its presence until you pointed it out. 

 

 

 

 

BrianMartin
12-Amethyst
(To:Sandy1)

Hi Sandy...

 

I've read through the thread but didn't have a chance to jump in. I can think of two or three ways to do what you're asking - but the most direct method would be to use flexibility. I realize you've tried that - but you are missing a critical piece of information. I am not making a judgment on whether or not you should use this technique. Most experienced users would question why you'd need to have one assembly with differing constraints. If you're trying to simulate something that moves - such as a hinge - a mechanism constraint would be much better. But, I'll leave those topics alone for the moment to provide an answer for your question.

 

The key is the parameter PTC_CONSTRAINT_SET which controls which constraint is "active" for any two items assembled together. This is an often forgotten parameter which is not typically displayed. The value of this parameter is a string containing the constraint set name. 

 

To explain, each constraint set has a name. You can see it on the Placement Tab during the operation to assemble a new component. You can change the name by typing a new one into the Set Name field as shown below.

 

constraint sets.png

You can create more than one constraint set if you wish. You can name each differently and determine which one is "active" by checking/unchecking the Set Enabled option. See below for commands to add new sets and enable/disable:

set enable.png

 

For my example, I am using the model shown below as my "static.asm". The default location for the pin in the cube will be location "X". I'm going to create separate constraints for the pin in all the other locations, too. Here's the model:

default cube model.png

 

After creating and naming 5 sets of constraints (one for each pin location A, B, C, D, and X), the constraint screen looks like this:

Constraint D Active.png

 

So now you have ONE assembly with 5 potential positions for the pin. You can now place this assembly within multiple other assemblies - and vary the pin position using Flexibility. There's a trick to it - but once you see it, it's very easy. There are a couple of ways to achieve the same result. I'm detailing just one method here.

 

Assemble your static.asm into a higher assembly as you normally would. Right-click the model in the model tree and select Make Flexible. From the Varied Items screen, select the Parameters tab. Add a new parameter using the "+" as shown below:

make flexible param.png

 

Here's where the trick comes in - to see PTC_CONSTRAINT_SET, you must change the parameter filter from Default to Current and Sub Features as shown below:

add_parameter.png

Find PTC_Constraint_Set and add it to the varied items list using the Insert Selected button. Change the New Value field to a different constraint name. It helps if you've named your constraints something memorable so they're easier to understand at this step.

 

Apply New Constraint.png

You can repeat this process as many times as you wish. For my example, I assembled 5 static.asm models and changed the constraint active for each. Here's the final result:

results.png

 

One final caveat - as with most things in Creo, there are many ways to achieve the same (or a similar) result. To become truly proficient, you'll need to learn the pros and cons of each option. Over time, you'll be able to evaluate the subtle trade-offs between each technique and choose the right one for your specific application. 

 

Hopefully this gives you enough details to solve the problem. Good luck!!

 

Best regards,

-Brian

Hi Brian,

 

Thank you for your response.

 

Your explanation is very clear,concise and well illustrated with pictures. I thought constraints were features, but they are classed as parameters. This is exactly what I was looking for. I believe many other users would benefit from your explanation as well.

 

Just wondering if you have any suggestions about a good book on fundamentals of Creo Parametric and on advanced assembly? A book that just do not tell you what to click but explain the rational behind it (also explaining the concept of design intent , top down and bottom up approach. Googling these terms aren't really helpful and I don"t have much clue what really is happening in that world. )

 

Anyone else who want to share a different technique of achieving the same result, please do so. Always good to have multiple techniques in your repertoire.

 

Thank you for your help and the time you spent doing all these drawings.Much appreciated.

 

Sandy

I would suggest adding Predefined Flexibility to static.asm.  This will allow you to vary the position as you add it to parent assembly.

  • In static.asm, select File/Prepare/Model Properties
  • Select change for Flexible in the Tools section
  • Follow @BrianMartin steps to select items to vary
    • You will not need to select a position
  • When adding static.asm to an assembly you will be asked if you would like to use the pre-defined Flexibility.
    • Select Yes
  • Select the Parameters tab and enter the desired constraint set name.
  • Constrain static.asm as usual.

There is always more to learn in Creo.

Hi, 

 

A few things worth mentioning:

 

  • Placement definition (3D constraint) is stored at the assembly level. 
  • To fully regenerate, external features references require the external model and the assembly the reference was created in to be in memory. 
  • External references make reuse problematic. If you don't have any external references there really isn't a reason to break the constraint between them as the components are already reusable (they can regenerate on their own).

 

Here's a few scenarios:

 

  1. If there are no external features references between A.prt and B.prt, and they are in correct 3D position, you can leave the constraints intact. The 3D position of each part is stored within STATIC.asm, not the part level. The assembly and each of the parts can be reused without issue.
  2. If you require multiple configurations of STATIC.asm, where A.prt and B.prt are in different 3D positions, you will need to create a copy of the assembly.

 

It might even be worth getting rid of the STATIC.asm layer altogether if A.prt and B.prt need to be placed differently within each of the RANDOM assemblies. Something like this:

 

Tdaugherty_0-1595258628860.png

 

Ty

 

Thank you for your response TY.

 

 The general information you provided is very useful indeed. That would prevent some headache and serve me well in future. 

 

It would seem that if I need multiple configurations of STATIC.asm, where A.prt and B.prt are in different 3D positions, then creating a copy of the assembly is the only way.

 

1. I can't get rid of STATIC.asm and use A.prt and B.prt alone. In reality STATIC.asm is quite complex and I do need it and also need to tweak it for different RANDOM.asm.

2. I am reluctant to create multiple copies of STATIC.asm just to accommodate it in different RANDOM.asm as I will need to create many  STATIC.asm (and rename them one by one). Plus it will take too much space. I was thinking there should be a more organic way of doing that, hence my question. So far, that would seem the only way.

 

Thank you

 

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags