Need some Ilogic help

Need some Ilogic help

Anonymous
Not applicable
370 Views
2 Replies
Message 1 of 3

Need some Ilogic help

Anonymous
Not applicable

I may have just been looking at this to long, but could use some help figuring it out.I have a full model (Assembly, Subassemblies , parts) That needs to grow upwards. My full model does this great. I put an overall height in and it is spot on.  My real model is in feet with some things being supressesed for various reasons. As i can't upload the real model due to IP i have done a test model to demenstrate. It also works great so far, 

My problem is if Standard =False i need the pattern to add a section, the plane to move up to this section and my part 5 subtract the difference so that the assembly total height = OA height.

 

Right now if i put 151.625 in the model will adjust to that height , but it leaves a gap between part 5 and the pattern.  I need the pattern and Plane1 to round up to the nearest multiple of 20 ( this would make the model 161.625 In height) Then i need part 5 to shrink to make the Assembly 151.625 tall.

 

So trying to get it to round up or down to the nearest multiple of 20 is where my problem is.

Hope it all makes sense and the test model is uploaded so play away.

0 Likes
Accepted solutions (1)
371 Views
2 Replies
Replies (2)
Message 2 of 3

asiteur
Collaborator
Collaborator

Hi,

 

I was too lazy to download your files but from your text I have some suggestions that may help you further.

 

1) The plane you refer to. You could make an iLogic rule that does something like this:

If Standard =False Then

Plane_distance=model_Length+part5_length

'Unsurpress Split feature

End If

Then, to get to the nearest multiple of 20 use this:

 

round(151.625/20)*20


Alexander Siteur
Project Engineer at MARIN | NL
LinkedIn

Message 3 of 3

cgriff100
Explorer
Explorer
Accepted solution

Alaxander,

Thanks for the reply

I have tried  this formula 

round(151.625/20)*20

It always takes it all the way down to 20, After much playing i did find that this works very well

SyntaxEditor Code Snippet

Result= Multiple*(Math.round(Height/Multiple))

 I don't know why it likes this better but it does.

I really apreciate the answer. 

I think i Solved it already.

0 Likes