Continue to Site

# Constrai sketch dinension within range

#### tim-ti

##### New member
I am trying toforce a dimension inone sketch to stay be close to an existing dimension in anothersketch.

I've written the following relation

IF sd48>=(rsd49-1)
sd48=(rsd49-0.9)
ENDIF

IF sd48<=(rsd49+1)
sd48=(rsd49+0.9)
ENDIF

This gives me an error if I am outside the range, but I'd like to not be permitted out of the range.

Can anybody suggest a technique that will keep my dimension witin a range.

Thanks, Tim

ur equation is funny

ie if sd1 = 5 and sd2 = 3

IF sd1>=(sd2 -1) 5 >= 2

sd1=(sd2 - 1) sd1 = 4

ENDIF

IF sd1<=(sd2+1) 4 = 4

sd1=(sd2+0.9) 4+0.9

ENDIF

sd1 = 4.9

why not just simply always have it just .1 higher?

sd48 = rsd49 + 0.1

Edited by: puppet

Hi Puppet,

What I'm actually after is to not be allowed to break the rule (rsd49+1)>=sd48>=(rsd49-1) when dragging nodes or slidersin my sketch.

I think that this can probably be done really simply, without the IF statement. That idea was a bit of a shot in the dark, and I think I may have not needed it.

I'm not sure I'm making any more sense now
? Can you describe a way to keep my new dimension in a range which is similar to the reference value?

Thanks, Tim

why not simply have it alwasy the same + .5?

sdX = sdy + 0.5

?

If I do that, I end up with a constant value. I'm trying to get my dimension to be the similar tothe existing value +/- some tolerance.

I posted this last night while the PTC customer sevice guys were asleep. They called me this morning, and we tried to work through it.

It turns out that ProE cannot do this - unless anybody knows better?

Tim

i'm working in WF (1.80). in sketch mode, i wrote these relation and it seemed to work.

if(sd2>=(rsd1+1))
sd2=rsd1+0.9
endif

if(sd2<=(rsd1-1))
sd2=rsd1-0.9
endif

if i try to modify the value of sd2, it keeps the value per the relation. lemme know if this works for you.

Ah, the extra set of ()

Thanks, Tim