How to create a subassembly

Hello,
How do I create a subassembly like an attachment?
Subassembly uses Subassembly.LinkWidthAndSlope and Subassembly.DaylightBench.
I know I use Civil3D Toolkit nodes (Assembly.ByNamePoint, Subassembly.ImportStockSubassembly, Assembly.AddSubassembly), but I don’t know the correct answer for the placement of the nodes.
Can you check the graph?

Create_Assembly_Subassembly.dyn (50.2 KB)

Hello @oh_ruki, I hope this can help you
Civil 3D Toolkit Feedback thread - #613 by Paolo_Emilio_Serra1 Civil 3D Toolkit Feedback thread - #669 by Drbohlav

Drbohlav,
Thank you for your reply.
I intend to create the graph in the same way, but it doesn’t seem to be created well.
I’m using Civil 3D Toolkit (1.1.22).
The side of Subassembly.LinkWidthAndSlope specifies 0, but it is created on the right side.
Also, Subassembly.DaylightBench is centered in the assembly.


Hello @oh_ruki, this works. Change hookPoint number to 1, delete assembly in model space and rerun script.

Drbohlav,
Thank you.
When I made a graph according to that, it was done.
How should I assemble the subassembly on the other side?
The side is described as 0-Left, 1-Right in the node, but in the graph provided this time, the side is 0, but the subassembly is created on the right side.
I still don’t understand the input values of Assembly.AddSubassembly, side and hookpoint.

Hello @oh_ruki, I made mistake, there should be “Right” instead of “Left” for groupName.
Here is picture of script for both sides. After some tests I needed to regen to move the subassemblies to the right position, see Civil 3D Toolkit Feedback thread - #670 by Paolo_Emilio_Serra1

Drbohlav,
Thank you.
I feel like I understand it somehow.
However, if you run it on the same graph, you will end up with an assembly like this.
It seems that LinkWidthAndSlope is not created on the left side.

You need to regen. Please read above. Try assembly properties and apply button.

Drbohlav,
I’m sorry to be late.
What kind of operation does “regen” mean?
Does that mean turn around in Civil3D properties instead of Dynamo?

As far as I know and what I tested, Yes.

Drohlav,
I understand, thank you.