Community Tip - You can change your system assigned username to something more personal in your community settings. X
I have a Model file .In my model file d21 is a name of a parameter. 22971 is the name of a feature.I want to display the feature id 22971 when d21==168
So i write a program in my relation
if d21==168
22971 = False
endif
But this is not working.Please help me to Solve my issue.
Hi,
you can suppress specific feature using Pro/PROGRAM functionality. Look into Creo Help.
MH
Can you please Explain with simple code ? Thanks in advance
Please refer to the content provided by Martin Hanak.
Here is a simple example.I want to display extrude 2 (Feat ID=76 ) when d3 value = 168.
Refer to the following steps:
1. Find the Feat ID in model tree (id = 76)
2. Create a new Parameter (Real number ,TEST, Initial value =70.0 ) and add a relation code (D3=TEST)
Hint:"In my model file d21 is a name of a parameter" => You can not use d21 directly, d21 is the name
of dimension.
3. Open Pro/program and find id =76
4. Add an if / end if statement in the program (blue font)
IF TEST == 168 <= Add here
ADD FEATURE (initial number 9)
INTERNAL FEATURE ID 76
PARENTS = 1(#1) 3(#2) 56(#8)
PROTRUSION: Extrude
NO. ELEMENT NAME INFO
--- ------------- -------------
1 Feature Name Defined
2 Extrude Feat type Solid
3 Material Add
4 Section Defined
4.1 Setup Plane Defined
4.1.1 Sketching Plane Surf:F8(EXTRUDE_1)
4.1.2 View Direction Side 1
4.1.3 Orientation Right
4.1.4 Reference SIDE:F1(DATUM PLANE)
4.2 Sketch Defined
5 Feature Form Solid
6 Direction Side 2
7 Depth Defined
7.1 Side One Defined
7.1.1 Side One Depth None
7.2 Side Two Defined
7.2.1 Side Two Depth Variable
7.2.2 Value 70.2103
SECTION NAME = Section 1
FEATURE'S DIMENSIONS:
d3 = (Displayed:) 70.2103
( Stored:) 70.2103 ( 0.0001, -0.0001 )
d4 = (Displayed:) 40.8952 Dia (weak)
( Stored:) 40.89523802445 ( 0.0001, -0.0001 )
END ADD
END IF <= Add here
5. Save and try it. ( display the feature when test = 168)