Jump to content

Expression challenge


art3mis

Recommended Posts

Have a expression problem but not sure if I can keep the logic in a single expression.
Right now I am using the following expression which works fine
Lets call this expression 'A'

fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)

However what I need to happen is when a different expression (lets call it 'B') results in an even number I need to either add or subtract .5 from expression A
This is expression 'B'. Paremeter name insetDepth which is same name as the parent HDA integer parameter being referenced.

ch("../insetDepth")*.5

 

Link to comment
Share on other sites

Hey Artemis the expression should be something along those lines if I understand correctly what you are trying to achieve:

if(ch("../insetDepth")*0.5%2==0,fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75)+0.5,fit(ch("../insetDistanceFromrear"),2,15,-8.25,-1.75))

the only part I am not sure about is what drives the addition or subtraction of 0.5. Should there be another if statement there? 

If you need to add even more code in the expression I would definitely try to do it in a wrangle cause it starts to get massive already :) 

Hope that helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...