RevitCity.com Logo

Home  |  Forums  |  Downloads  |  Gallery  |  News & Articles  |  Resources  |  Jobs  |  FAQ  |  SearchSearch  |  Join  |  LoginLogin

Welcome !

80 Users Online (79 Members): Show Users Online - Most ever was 626 - Mon, Jan 12, 2015 at 2:00:17 PM

 

Forums

Forums >> Revit Building >> Tips & Tricks >> parametric array with script: can't figure it out

Search this ThreadSearch this Thread | Page 1 of 1 |

Tue, Feb 2, 2016 at 4:52:15 PM | parametric array with script: can't figure it out

#1

bjornschoebericht


active

Joined: Thu, Jun 18, 2015
0 Posts
No Rating


Dear boys and girls, this is my first ever post here! Cakeday in a year ;-)

 

I am in need for really smart people :-), concerning the functions/scripting in Revit and a special case which I am trying to make.

It's about a (curse, I'm Dutch, I don't know the English terms, but I'll try) wooden truss. The case is this:

- I have a truss consisting of 2 horizontal wooden beams.

- these have to stretch as I pull it in Revit (already works)

- in between them, there a small standing beams (columns) in an array.

- this array nów works as: =length/hoh (hoh, means "heart to heart, so it is the distance between to consecutive standig columns)

- so the 'n', for number of little columns, is length divided by hoh.

- this 'n'works with a ROUNDDOWN. So in total it's:  n= ROUNDDOWN(length/hoh).

This works fine, if you find it ok that at the end of the array, there can be a "double" column, whith the last one standing really close to the second last.

 

BUT, it needs to do something differently. It needs to work as follows:

It needs to divide the total length in equal spaced parts with columns. So the columns must be evenly spread throughout the length, BUT, the HOH (distance between columns) may never be larger than 600mm (or whatever /inches). So the HOH should be between 400mm and 600mm. When we pull the length of the truss, it should still be dividing the columns in even spaces, until the HOH reaches 600, after which the array number should be +1. than the proces should start allover. also while pushing it back in, the array should space evenly, until the HOH reaches the minimum of 400mm (or something like that), which makes the array lose n-1.

So I've tried it out, but I get a circular reference in the function. I cannot seem to logically think it out.. 

It should be something like: IF HOH>600, THEN N(umber of columns)+1. IF HOH<400, THEN N-1.

But simultaneously it should do: N = Length/HOH.

And thát my friends, creates the inception..

So is there a way around this in which it works? Does anybody know enough Revit code to do this..?

Your help would SOOOOO enourmously be appreciated!

 



Attached Files

This user is offline

View Website

Wed, Feb 3, 2016 at 5:15:55 PM | parametric array with script: can't figure it out

#2

bjornschoebericht


active

Joined: Thu, Jun 18, 2015
0 Posts
No Rating


Dear all,

On www.revitforum.org I got a really fast and super reply on  this post. I've tweaked the family Simon gave me a bit, and now it does exactly what I hoped for!.

Sharing is caring, so here you go!

 

Greets,

Björn

 



This user is offline

View Website

Thu, Feb 4, 2016 at 10:18:35 AM | parametric array with script: can't figure it out

#3

marmiketin1


active

Joined: Wed, Aug 19, 2015
0 Posts
4.5 Stars: 10 Votes


First you need to set a parameter for MAX HOH = 400mm

To get the number of columns you need a parameter ARRAY NUMBER = LENGTH/MAX HOH + 1 (adding the +1 makes it so that the HOH ACTUAL in the next step will always be less than 400mm.)

Then for your HOH actual spacing you would use a parameter HOH ACTUAL = LENGTH/ARRAY NUMBER

Hopefully this helps



Edited on: Thu, Feb 4, 2016 at 10:19:08 AM

This user is offline

 

Search this ThreadSearch this Thread | Page 1 of 1 |



Similar Threads

Thread/Thread Starter

Forum

Last Post

Replies

Parametric Array Constraints

General Discussion >> Revit Project Management

Tue, Jul 2, 2019 at 7:00:45 AM

2

Parametric Arrays

Community >> The Studio

Fri, Feb 5, 2010 at 3:19:22 AM

1

[Dynamo] Can't get script to work

Workflow & Implementation >> API & Third Party Apps

Tue, Sep 4, 2018 at 4:15:18 AM

1

Centering a parametric array in a family - RAC 2009

Revit Building >> Technical Support

Thu, Jul 16, 2009 at 12:10:04 PM

0

Parametric Array

Revit Building >> Technical Support

Wed, Feb 8, 2006 at 11:14:52 AM

0

Site Stats

Members:

1988838

Objects:

22877

Forum Posts:

152179

Job Listings:

3

Sponsored Ads

Home | Forums | Downloads | Gallery | News & Articles | Resources | Jobs | Search | Advertise | About RevitCity.com | Link To Us | Site Map | Member List | Firm List | Contact Us

Copyright 2003-2010 Pierced Media LC, a design company. All Rights Reserved.

Page generation time: 0.5178

Login

User Name:

Password:

Remember Me  

Forgot Password?

Search Forums

Advanced Search

Search Forums

Advanced Search


Clear Highlights


Clear Highlights