Skip to main content
16-Pearl
April 25, 2013
Question

IF Diameter

  • April 25, 2013
  • 4 replies
  • 922 views
Is it possible to add a temp relation that says IF a diameter = 5.18,
then make it = 5.00? Gotta lotta holes to change and thought maybe I
could change them in one fell swoop.

    4 replies

    23-Emerald IV
    April 25, 2013
    Are these all in one model, or many models?

    Exact syntax for one diameter is this (replace DIAMETER with the dimension name):

    IF DIAMETER == 5.18
    DIAMETER = 5.00
    ENDIF

    Tom U.
    wfalco16-PearlAuthor
    16-Pearl
    April 25, 2013
    Sounds good.

    I tried and get this...

    IF DIAMETER == 5.18
    errorInvalid symbol 'DIAMETER' found.
    DIAMETER = 5.00
    ENDIF


    23-Emerald III
    April 25, 2013
    Replace DIAMETER with the parameter that is originally driving the diameter dimension.

    IF p254 == 5.18
    P254=5.00
    Endif

    If all of the holes are in a pattern then this should work, but 1 edit to the master hole will do the same thing.
    If your holes are defined independently, then nothing will work, unless you have changed them to use a defined parameter for the diameter.

    Thank you,

    Ben H. Loosli
    USEC, INC.
    12-Amethyst
    April 25, 2013

    You could try using Edit Program, which opens in a text editor, and replace 5.18 with 5.00. If there are no dimensions at 5.18 that you want to preserve, just to a mass replace.


    In Creo2 it's:


    Tools > Model Intent > Program > Edit Design


    (Warning, if it's an assembly, you'll need Advanced Assembly to use this.)



    In Reply to Wayne Falco:


    Is it possible to add a temp relation that says IF a diameter = 5.18,
    then make it = 5.00? Gotta lotta holes to change and thought maybe I
    could change them in one fell swoop.