Donate Now Goal amount for this year: 2500 USD, Received: 1627 USD (65%)

Results 1 to 8 of 8
Like Tree1Likes
  • 1 Post By Dave Jones

Thread: Forumla to offset

  1. #1
    Junior Member
    Join Date
    November 10, 2015
    Location
    Mlebourne
    Posts
    9
    Current Local Time
    11:47 PM

    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. #2
    Member
    Join Date
    September 16, 2015
    Location
    Darwin, Australia
    Posts
    171
    Current Local Time
    02:47 PM
    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.
    Last edited by LukeEvans; November 26th, 2015 at 12:46 AM.

  3. #3
    Junior Member
    Join Date
    November 10, 2015
    Location
    Mlebourne
    Posts
    9
    Current Local Time
    11:47 PM
    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. #4
    Member
    Join Date
    September 16, 2015
    Location
    Darwin, Australia
    Posts
    171
    Current Local Time
    02:47 PM
    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. #5
    Junior Member
    Join Date
    November 10, 2015
    Location
    Mlebourne
    Posts
    9
    Current Local Time
    11:47 PM
    Quote Originally Posted by LukeEvans View Post
    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. #6
    Member
    Join Date
    September 16, 2015
    Location
    Darwin, Australia
    Posts
    171
    Current Local Time
    02:47 PM
    No worries!

  7. #7
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Posts
    1,401
    Current Local Time
    06:17 AM
    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. #8
    Moderator
    "I am NOT a Revit tutor!"
    Dave Jones's Avatar
    Join Date
    December 7, 2010
    Location
    San Luis Obispo, California USA
    Posts
    4,493
    Current Local Time
    09:17 PM
    Quote Originally Posted by josephpeel View Post
    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
    Ning Zhou likes this.

Similar Threads

  1. Activate Offset Box ?
    By mark b in forum Architecture and General Revit Questions
    Replies: 12
    Last Post: September 12th, 2017, 04:34 PM
  2. Offset taper? or Offset transition?
    By nick_h in forum MEP - General
    Replies: 0
    Last Post: January 14th, 2014, 07:10 PM
  3. Array Forumla Help
    By MartinGT in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: November 14th, 2013, 11:31 AM
  4. Start & End Offset vs. z-Direction Offset
    By Mr_Greg in forum Structure - General Questions
    Replies: 9
    Last Post: January 29th, 2013, 08:28 PM
  5. Tag with offset parameter
    By MartinGT in forum Architecture and General Revit Questions
    Replies: 0
    Last Post: January 23rd, 2013, 10:00 AM

Posting Permissions

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