Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

1. ## Forumla to offset

Hi All,

I am trying to create a parameter that can control an offset from a line, the issue is I want this offset to work with both positive and negative values.

So far I have

if(Plan Offset > 0',2000' + Plan Offset,"0")

But I get an error saying inconsistent units and i'm not sure why.

Can anyone help?

Regards,

2. Welcome to the forum!

Remove the quotation marks on either side of the zero and it will fix the inconsistent units issue, the quotation marks will treat the zero as text, not a value. I'm not sure how you could accomplish a positive negative but am sure someone else here has done something like this before.

3. Thanks for the reply Luke.

So I managed to get it working like this.

if(Plan Offset > 0 mm, (2000 mm / 1) + Plan Offset, 2000 mm / 1)

but now I want to add

if(Plan Offset < 0 mm, (2000 mm / 1) + Plan Offset, 2000 mm / 1)

so that it will use the appropriate formula based on whether Plan Offset is greater than zero or less than zero.

Regards,

4. Just a stab in the dark here, but this may be what you are looking for:

if(Plan Offset > 0 mm, (2000 mm / 1) + Plan Offset, if(Plan Offset < 0 mm, (2000 mm / 1) + Plan Offset, 2000 mm / 1))

You can use another Boolean expression in place of your false value. So maybe this could work?

5. Originally Posted by LukeEvans
Just a stab in the dark here, but this may be what you are looking for:

if(Plan Offset > 0 mm, (2000 mm / 1) + Plan Offset, if(Plan Offset < 0 mm, (2000 mm / 1) + Plan Offset, 2000 mm / 1))

You can use another Boolean expression in place of your false value. So maybe this could work?
That worked exactly how I wanted it too.

Thanks alot Luke.

6. No worries!

7. I have seen positive and negative offsets done in a couple of ways.

One is you make 2 ref planes. The first offsets in a positive direction from your origin. The other offsets in a negative direction from the first line.
Then if the offset is positive only the first ref line gets moved and the offset of the second is set to zero.
If the offset is negative then the first lines offset is set to zero and only the second line gets moved, in the negative direction.
Lock your object to the second ref plane and you can offset it either way.

The other way is to use a workplane based generic model, which only has a line in it. Place this family on one of your workplanes and you can give it a positive or negative offset like any other workplane based family. Lock whatever you wanted to move to the line in the family.

8. Originally Posted by josephpeel
I have seen positive and negative offsets done in a couple of ways.

One is you make 2 ref planes. The first offsets in a positive direction from your origin. The other offsets in a negative direction from the first line.
Then if the offset is positive only the first ref line gets moved and the offset of the second is set to zero.
If the offset is negative then the first lines offset is set to zero and only the second line gets moved, in the negative direction.
Lock your object to the second ref plane and you can offset it either way.

The other way is to use a workplane based generic model, which only has a line in it. Place this family on one of your workplanes and you can give it a positive or negative offset like any other workplane based family. Lock whatever you wanted to move to the line in the family.
your first method is the one that I like to use and it is described in detail in this blog post

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•