Curve by start and end point takes wrong way

@mustanachar Almost the solution:

I used the same nodes. This is still difficult, I now have the polycurve but I have lost my elements from which I get the diameter and fill in a parameter.

First Dynamo script is never easy - stick at it!

Can you source it from earlier in the script? As long as the order of elements is the same it should be possible to draw on it from earlier. If it is in a different order, you could get the X/Y of the start point and compare it, then use a ‘index.of’ and ‘getitematindex’ to rearrange the parameters and their pipe runs into the same order.

See a very basic example of how it could possibly work;

@GavC

Thanks again!

Here a screenshot with what happens. I know that the name parameter is not entered correctly this way.

I will upload my script. “Maat X” must go up perodically because that is the slope.!

I like to hear from you!

Over here revit file included the family of the brackets and the script:

foundation brackets.dyn (65.6 KB)

The node after element.location should be replaced with your script that turns your pipes into polycurves that we worked through before. This was just a placeholder to graphically represent this as I didn’t have the script on hand to insert in at this point.

@GavC

This screen shot?

example

The script after that which was able to find the heights to offset the pipe by (I sent the .dyn). There are parameters for start/end offset available which you can set using the numbers for the curves of the polycurve with the slope applied to each curve.

Capture |

I would put the scripts together for you, but I build in Dynamo 2.0.3 so the list management is different. See how you go putting the two scripts together…

Thank you for youre reply.

2.0 is no problem, I can try the script on my laptop.
Do I need to create a slope in to my pipes (in revit)?

1 Like

Have a look at the DYN script file I sent before - if you use Dynamo 2 it should be able to calculate the height change in the pipes from start to end of run if you manipulate the number field which sets the slope angle.

Simple take the values from +Height, and apply these to the parameters for start/end of all but the last run (the last point is the end of the last run). I would use a ‘list.chop’ node to break the lists like this;

Pipe 1: start point > height 0 (+0)

Pipe 1: end point > height 1 (+x1)
Pipe 2: start point > height 1 (+x1)

Pipe 2: end point > height 2 (+x2)
Pipe 3: start point > height 2 (+x2)

etc…

Pipe n: end point > height 3 (+x3)

The script I sent earlier (after the one in the above screenshot) is just to make sure your pipes and list of curves are in the same order, as the pipes are not typically in the same order when they come out of the ‘select model elements’ node as the polycurves respective curves.

2 Likes

@GavC

This works very well! Thank you!

From this I can determine the position of my brackets!

Is the slope always created from below?

The way the script is written it is going up from the start of the polycurve, however you could use the reverse polycurve node and multiply the heights by -1 to descend from the other end if that’s more ideal.

Glad it helped :slight_smile: