Skip to main content
3-Newcomer
August 17, 2023
Solved

code for choosing from more than one model in a part

  • August 17, 2023
  • 1 reply
  • 1484 views

Hello everyone,

There is a part that has been designed before, when I open the part, it asks me to write the model I will choose and it arranges the model according to the answer I give.

There are some formulas in the parameters, but when I looked at the programming part, I could not find an "if" formula for body selection. The family table is also empty.

I can do this from the family table, but every time I open the part, it asks, which is a problem for me.

How can I do this with the if command from the programming part?

What I want to do is for the user to see the model they want by typing the model code they want.

can you help with this issue?

 

2.JPG  When the user selects model 1, the model tree looks like this.

 

1.JPGWhen the user selects model 2, the model tree looks like this.

 

1 reply

Chris3
21-Topaz I
August 17, 2023

When you say "code" I am going to assume you are referring to Pro/Program. If so you want to check out this thread:

https://community.ptc.com/t5/3D-Part-Assembly-Design/Pro-Program-IF-statement-question/td-p/675380 

3-Newcomer
August 17, 2023

thanks for your reply. I meant "pro/program" as you said. In the example you gave, the "feature" code seems appropriate to me, but I get an error when typing "feature id".

Is there a more descriptive example?