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.
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?
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
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.