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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Deactivate a feature Id

ddhini
15-Moonstone

Deactivate a feature Id

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.

4 REPLIES 4
MartinHanak
24-Ruby III
(To:ddhini)

Hi,

you can suppress specific feature using Pro/PROGRAM functionality. Look into Creo Help.

MH


Martin Hanák
ddhini
15-Moonstone
(To:ddhini)

Can you please Explain with simple code ? Thanks in advance

kai-2
7-Bedrock
(To:ddhini)

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)


1.jpg

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.

4.jpg

3. Open Pro/program and find id =76

2.jpg

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)

5.jpg

6.jpg

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags