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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

flexible component relations and parameters

ptc-99899
1-Newbie

flexible component relations and parameters

I created a simple threaded rod and made the overall length flexible and the length of threads on each end flexible. ½-13unc-2a
I changed the name of the overall dimension to OVERALL_LENGTH.
I created a relation (well I tried): BOM_DESCRIPTION_ASM=".500-13UNC-2A+"+"X"+ OVERALL_LENGTH.

HOW COME THIS DOESN'T WORK?

I also tried creating a relation:
LENGTH=OVERALL_LENGTH
SIZE=.500-13UNC-2A X
And
BOM_DESCRIPTION_ASM = SIZE + LENGTH

HELP

Peggy Volz
Engineering Technologist
Weapons Engineering
Los Alamos National Laboratory
505-667-6831
-
FACT OF LIFE: After Monday and Tuesday even the calendar says---W T F


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3

Hi Peggy,
I think the problem lies with the thread as a variable as you show. You
say "flexible" and that means something very specific in ProE/Creo so I am
thinking you mean variable instead.

If your threaded length can vary then you need a variable for this length.
You write a relation to assign a variable to the length for each thread.
Then the rest of you relation should be to the effect of Length minus
(thread length one plus thread length two).

Hope this makes sense.


Regards,

*Brent Drysdale*
*Senior Design Engineer*
Tait Communications
TomU
23-Emerald IV
(To:ptc-99899)

Peggy,

Pro/e does not "type-cast" parameters in part/assembly mode. By that I mean, you can't set the value of a string parameter equal to the value contained in another type of parameter without doing some kind of conversion first. To convert an integer parameter, or the integer portion of a real parameter, you can use the ITOS - "Integer to String" function. To convert a real number to a string it's more complex. You will need to build a statement to handle the portion of the number before the decimal place and a second set of statements to deal with the portion after the decimal place. Now none of this conversion is necessary if you are combining these mixed type parameters in a note (drawing or part) or table cell (drawing).

To make your statement below work (integer portion only), do this:

BOM_DESCRIPTION_ASM=”.500-13UNC-2A+”+”X”+ ITOS(OVERALL_LENGTH)

or this:

LENGTH=ITOS(OVERALL_LENGTH)
SIZE=".500-13UNC-2A X " [need quotes]
And
BOM_DESCRIPTION_ASM = SIZE + LENGTH

Keep in mind that the ITOS function does not work properly on zero value parameters. It will return an empty string, not "0".

If you need to keep the decimal place, then use something like this:

W = "
R = "
W = ITOS(OVERALL_LENGTH)
IF FLOOR(OVERALL_LENGTH,3) > W
R = ITOS((FLOOR(OVERALL_LENGTH,3) - W) * 1000)
IF STRINGLENGTH(R) == 1
LENGTH = W + ".00" + R
ENDIF
IF STRINGLENGTH(R) == 2
LENGTH = W + ".0" + R
ENDIF
IF STRINGLENGTH(R) == 3
LENGTH = W + "." + R
ENDIF
ELSE
LENGTH = W + ".000"
ENDIF

Note - I am typing this in email and do not have Pro/e available in front of me right now to double check syntax.

Tom U.

At first glance, I would think the solution is Family Tables rather than flexing. From what you describe a threaded rod, in the real world, is not something that will flex like a coil spring.
Have you considered using Family tables for your application?

Regards,

Steve Shannon
Tooling Engineer
trans-matic
300 East 48th St.
Holland, MI 49423
phone (616) 820-2427
fax (616) 820-2488
www.transmatic.com
Top Tags