Skip to main content
1-Visitor
July 9, 2019
Solved

How to add dropdown with values from IF statement to UDF

  • July 9, 2019
  • 1 reply
  • 1410 views

Hi everybody?

I would like to create an UDF to create keyway grooves on a Shaft based on the DIN 6885.
For example, a shaft with a diameter between 5mm and including 8mm, has a keyway-groove with a depth of 1.2mm, a width of 2mm, and a possible length of 6mm, or 8mm, or 10mm, or 12mm, or 14mm, or 16mm, or 18mm, or 20 mm.

When placing an UDF on a shaft I would like to have a dropdown with the possible values for the length appearing, or a prompt with the question to choose between the length values that are applicable for that range of shaft diameter.

Is this possible?

Greetings Mathieu

Best answer by tbraxton
From PTC help files;
You can create a UDF with the following dimension types:
Variable dimensions—Dimensions for which you will enter values when you place the UDF in a part.
Invariable dimensions—Dimensions that you will not change when you place the UDF in a part.
Table-driven dimensions—Dimensions and dimension tolerances for which values are given in a family table. Every instance in the family table has its own dimension values.
 
Using variable dim will prompt the user for a value. If you want to control it using dims based on shaft geometry as a parent then you should check out Pro/Program.

1 reply

tbraxton
22-Sapphire II
tbraxton22-Sapphire IIAnswer
22-Sapphire II
July 9, 2019
From PTC help files;
You can create a UDF with the following dimension types:
Variable dimensions—Dimensions for which you will enter values when you place the UDF in a part.
Invariable dimensions—Dimensions that you will not change when you place the UDF in a part.
Table-driven dimensions—Dimensions and dimension tolerances for which values are given in a family table. Every instance in the family table has its own dimension values.
 
Using variable dim will prompt the user for a value. If you want to control it using dims based on shaft geometry as a parent then you should check out Pro/Program.
Mathieu_T1-VisitorAuthor
1-Visitor
July 10, 2019

Hi @tbraxton,

 

Thank you for the answer. I tried with the pro/program, and it works, however to be able to activate the pro/program in UDF, you should choose Subordinate, and not Stand Alone. Otherwise pro/program is not available in the options to choose from.