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

Screw with variable length

Highlighted
Level 10

Screw with variable length

I want to create a library part of a screw, as a skeleton. The screw geometry will then be copied over to another part via copy geometry, with a specific length to suit the design need. How do I allow the user to adjust the length each time the geometry is copied over? I tried using pro/program with an input prompt on the length but it will prompt for the length input each time it's regenerated, not good. I just need the length input once, how to do it? Thanks for your help.

Tags (3)
18 REPLIES 18

Re: Screw with variable length

Usually you want to create a Family Table for screws.

Re: Screw with variable length

Yes, Family Table is one way and it's easier to deal with. But the table can only cater for predefined lengths. In my case, I would like the length to be a variable and to be set by the user prior to the copy geometry. Any idea?

Re: Screw with variable length

Ok...so how about Flexible Components?

Re: Screw with variable length

Or using your skeleton as a Start Part?

Re: Screw with variable length

Does it work on the part/skeleton level? In my application, this will reside in skeleton part.

Re: Screw with variable length


@BHOoi wrote:

I tried using pro/program with an input prompt on the length but it will prompt for the length input each time it's regenerated, not good. I just need the length input once, how to do it? Thanks for your help.


You could try this. Your part will need to have a default length of 999. If you regenerate, PRO/Program will ask for input because ASK_FOR_INPUT is YES.

 

As soon as you enter a different value, ASK_FOR_INPUT will become NO, and PRO/Program will stop asking for input.

 

VERSION 4.0
REVNUM 527
LISTING FOR PART PRT0001

INPUT
 IF ASK_FOR_INPUT == YES
     CUSTOM_LENGTH NUMBER
 END IF
END INPUT

RELATIONS
IF CUSTOM_LENGTH <> 999
   ASK_FOR_INPUT = NO
ELSE
   ASK_FOR_INPUT = YES
ENDIF
END RELATIONS

Re: Screw with variable length

Oh, if you want, you can rewrite the IF...THEN statement to a single line:

 

ASK_FOR_INPUT = (CUSTOM_LENGTH == 999)

Re: Screw with variable length

I am still on Creo 2.0. Is that "ASK_FOR_INPUT" available in Creo 2.0?



 

Re: Screw with variable length

ASK_FOR _INPUT is just a user defined parameter (type YES_NO), so you can name it anything you want. :-)

 

You might need to create that parameter first before putting all the other code in.