Skip to main content
3-Newcomer
January 6, 2017
Question

Assembly program to control program in a component

  • January 6, 2017
  • 2 replies
  • 3261 views

I have an extension spring modeled up with a program to control 4 different spring lengths.  A free length, and three different extended lengths, 1, 2 & 3.  The assembly that the spring goes into has a program that controls a component offset value to show three different states, 1, 2 & 3.  Is there a way in the assembly program to control the program in the spring model?  What I want to do, is when the assembly is regenerated in the "1" state, I want the spring to regenerate in the "1" position, and do the same for 2 & 3.  Is this possible, if so, how would I go about adding whatever needs to be added to the assembly program to control this?

I've made spring components flexible in the past to control a compressed height.  This spring is an extension spring and has loops modeled on each end, and isn't modeled in an easy way to allow it to be flexible and be stable...I have the program lengths to work without any failing features and would like to keep it that way if possible.

Thanks for any info.

Ted

2 replies

21-Topaz II
January 9, 2017

Would you be able to use family tables? If so, you could have instances for each of the four stable lengths and a similar set of instances of the assembly that use each of those lengths.

If you're wanting to change a parameter in the assembly and have the spring change accordingly, that could be done too, with relations. You could set up some relations in the assembly that pass the necessary dimensional changes down to the springs. In case you haven't done this type of thing before, here is the basic way:

(1) In the assembly, enter the relations editor with Tools->Relations

(2) In the editor window that pops up, use the Show->Session ID to get the session ID of the spring component(s).

(3) With the ID number, you can write relations in the assembly to modify components, such as:

    SpringLength:2 = NeededLength

    where "SpringLength" is the part parameter/dimension you want to change, "2" is the Session ID of the part, and "NeededLength" is the target length.

(4) Note that for a part (.prt) the session ID is always an even number (0, 2, 4, ... ).

Hopefully this is helpful.

TedOtto3-NewcomerAuthor
3-Newcomer
January 18, 2017

I will have to play around and see if I can make something work.

thanks!

1-Visitor
January 9, 2017

Look at the Execute statement for the Program to push values from the assembly program to the part program.

1-Visitor
January 11, 2017

you can pick family table members with pro/program. You can also suppress and unsuppress features based on a parameter.

i don't know what the above member means with execute, but you can push values (parameters) from asm to part with a simple relation:

PRM:11 = PRM

where 11 is the target part session ID. you can get it in relations somewhere in the menus.

1-Visitor
January 11, 2017

EXECUTE

Replaces the ADD end END ADD

This is for assemblies to link assy input variables to program variables in assembly components.

EXECUTE {PART}/{ASSY } name or variable

input variable of design at next lower level = expression

input variable.....

END EXECUTE