Place point-based adaptive component on a model line

I have a tunnel segment adaptive family that I can manually place on a normal plane of a model line and it then stays attached to it (moves accordingly when the line gets moved or rotated, see gif).

I want to place multiple segments in this manner using Dynamo, but I’m struggling to get there. I have tried multiple ways of placing the family but always end up with it being inserted in the right location, but on a horizontal plane (attempts are attached). What am I doing wrong? Do I have to use the API to get there or, preferably, is there a way just using nodes?

adaptive_model_manual_input

adaptive_on_model_line.rvt (1.3 MB)


place_adaptive_element_on_model_line.dyn (55.3 KB)

1 Like

@vancikv ,

first i would flex your families…
my volumes are on the adamtive point plane…

than create the script…

i did it with a surface.



KR
Andreas

2 Likes

Thanks for the answer. I changed the family setting, but I still don’t see how you managed to place the family via Dynamo. Did you actually manage to make it dependent on the model line? Can you elaborate?

NVM, I got it

1 Like

I think selet family types,than put them into the place where you want them to be is better than select exsiting family instances then change their locations.

Hi @vancikv
first to host adaptvie family to line by using dynamo has a problem in API, yes you can do that maual but from API you can not for bug in revit API.

secand: if you add adaptive point host by line you will face problem in the torsion angle (twist) and it is very difficult to solve and avoid this rotation.

for that i do not inset adaptive family host by line. I insert it in global and defiend it to be Z global and instant XY plan as @Draxl_Andreas wrote.
image

also you can use “BriMohareb_2023” to create the model and calculate the angle

also this family templet maybe help you

2 Likes

Thanks for the reply. It seems odd, though, because I have actually achieved what I wanted using a code snippet from the post of yours that you’re refering to. At least I think so. You’re saying there’s some problem with a twist? I’m posting my solution, can you pinpoint that problem?

Btw @Draxl_Andreas actually suggests Instance(Z) if my german’s still OK, not Global(Z) as you’re claiming. Instance(Z) worked for me :person_shrugging:

working_example

tubosider_placement.rvt (1.3 MB)

adaptive_mod.dyn (8.3 KB)

2 Likes

Hi @vancikv
First thank you for reply
1- yes you are right it Instance(Z) i am confuse.

2- the api problem is in host on line in family not model line (in your case you are right :ok_hand:)

3- for twist: if you host point in curve the coordinate system is flow the coordinate system of line and the family twist anlut the the line


4- in case you have curve you can not calculate XY plane angle
image

5- if the tunnel segmental, yes the cross section is perbediclar to the Alignment but in the Cast In-situ the cross section need to be Z global
image