Quantcast
Viewing all articles
Browse latest Browse all 11560

Re: Does anyone know how to achieve it in Creo?

Hello,

 

use the following relations:

 

/* v ... real parameter

/* y ... real parameter

/* x1 ... string parameter

/* d0 ... name of diameter dimension

/*******************************************

v=0

/*******************************************

x1=extract(rel_model_name(),4,1)

y=1000

if x1=="0"

v=v+0*y

endif

if x1=="1"

v=v+1*y

endif

if x1=="2"

v=v+2*y

endif

if x1=="3"

v=v+3*y

endif

if x1=="4"

v=v+4*y

endif

if x1=="5"

v=v+5*y

endif

if x1=="6"

v=v+6*y

endif

if x1=="7"

v=v+7*y

endif

if x1=="8"

v=v+8*y

endif

if x1=="9"

v=v+9*y

endif

/*******************************************

x1=extract(rel_model_name(),5,1)

y=100

if x1=="0"

v=v+0*y

endif

if x1=="1"

v=v+1*y

endif

if x1=="2"

v=v+2*y

endif

if x1=="3"

v=v+3*y

endif

if x1=="4"

v=v+4*y

endif

if x1=="5"

v=v+5*y

endif

if x1=="6"

v=v+6*y

endif

if x1=="7"

v=v+7*y

endif

if x1=="8"

v=v+8*y

endif

if x1=="9"

v=v+9*y

endif

/*******************************************

x1=extract(rel_model_name(),6,1)

y=10

if x1=="0"

v=v+0*y

endif

if x1=="1"

v=v+1*y

endif

if x1=="2"

v=v+2*y

endif

if x1=="3"

v=v+3*y

endif

if x1=="4"

v=v+4*y

endif

if x1=="5"

v=v+5*y

endif

if x1=="6"

v=v+6*y

endif

if x1=="7"

v=v+7*y

endif

if x1=="8"

v=v+8*y

endif

if x1=="9"

v=v+9*y

endif

/*******************************************

x1=extract(rel_model_name(),7,1)

y=1

if x1=="0"

v=v+0*y

endif

if x1=="1"

v=v+1*y

endif

if x1=="2"

v=v+2*y

endif

if x1=="3"

v=v+3*y

endif

if x1=="4"

v=v+4*y

endif

if x1=="5"

v=v+5*y

endif

if x1=="6"

v=v+6*y

endif

if x1=="7"

v=v+7*y

endif

if x1=="8"

v=v+8*y

endif

if x1=="9"

v=v+9*y

endif

/*******************************************

d0=v

 

Rename part and regenerate it.

 

Martin Hanak


Viewing all articles
Browse latest Browse all 11560

Trending Articles