Dear all, in the continuity of a previous post of mine “reference to TEKLA objects” I have built up a parametric custom component which deals with about 50 bolt configurations. The assembly is just a bolted splice between stiffeners which applies as said about 50 times. Almost all joints are different hence it would be quite handy to apply it via GH.
Two questions :
how can I call out the model objects (plates) which are already generated in TEKLA? With reference to the previous post it seems there is no way to call them out by their names. This is very unfortunate as all pieces are named uniquely hence it would came very handy… Any C# or idea available besides annoying filtering done in TEKLA?
As said the component is parametric meaning that for each assembly I can decide the predefined joint configuration among the 50. These different configurations are dealts with via a .dat file (one row per bolt and splice plate configuration). It seems that section can be choses via the P1 variable (I found this out via deconstruct component of the component inserted via GH). If I list various P1 in different lines the component does notwork hence I shall probably pass via a semicolon list… (have not got the time to test as I got stuck to the previous question…)
I doubt that this shall be set as input and that correspond to the “non-default attribute: position_type 2”.
NOTE 1: In the last image the attribute panel is just a copy of the attribute found via deconstruct of a manually inserted component. Else the component does not work.
NOTE2 : The P10 variable pops out once I do a deconstruct of the component once inserted via GH. It is then manually inserted in the attribute panel. Is it possible to input it as a list ?
Nice to see you again struggling with Tekla Live Link !
For the components, the way to search for attributes is actually what you did. Insert the component by hand, change the attributes in Tekla (if you leave the default options, attributes won’t show up), reference and deconstruct it, then search for the appropriate attributes in the list.
- I thought we’d discovered the Pipeline component, that allows you to reference objects by filter, is it not possible ?
If you are looking to associate a yellow plate to two blue plates, then you have to use a similar idea to Reference to TEKLA objects by their names, reference all yellow plates, deconstruct the plate and get the center of gravity, and search (using Curve CLosest Point) the two blue plate boundaries closest to that point.
- I think this should work if you feed trees in the
Component component. Remove the Flatten options on M and 1S inputs. Then build one-level trees as follow (the two latter ones being Tekla Parts, not text) :
- I think it’s possible to define a selection filter like “Part which Name equals xxx” ?
Anyway, I don’t think you really need it. You should be able to do a View Filter in Tekla (by class, or by names) so that only your blue plates appear. Then, use a Part parameter, right clic > Set Multiple and reference all of them. Then the sorting/grouping will be done in Grasshopper.
Here is an idea to sort those, assuming all your plates are somehow aligned.
If you could reference all your plate contours and internalise them, this would help finding a good sorting criteria.
- Should work with a panel with a single new line. Alternatively the attributes can be sent as a single string, with attributes separated by a semicolon (never actually tried this before).
NewLine.gh (14.7 KB)
@magicteddy thank you for your helpful tips.
- If I do so (selecting of all objects in once) the objects are randomly arranged. I need a hint about sorting methods. The easiest thing I could think of is of course deconstruct the beams and sort their curves longitudinally then unflatten the list by branches each containing 6 items and then sort each group of 6 transversally by another reference line. I’m sure there is another more intelligent way but that should work.
Basic question which shamefully I could not manage to achieve : How can I unflatten the (flattened) list by a number of tree each containing 6 items? I think that the unflatten component should work but how shall I define the “Guide G”? Path mapper as well certainly work but I could not manage…
Getting stuck with the operation above and aiming at seeing whether the component and the P1 structure works I tried to do manual selection by groups of 6 items (always selected with the same selection method (right to left / top to bottom) as I though that I could have found them all sorted the same way). But in fact no… Herebelow the first three left handed items and the first three right handed. They are not head to head and the component won’t work well it woulks at random locations where the objects are “head to head” then here good news. Re-sorting the object basic curves is therefore crucial.
Thank you in advace.
You could use
Partition List to group objects by 6, but the entire list has to be in order first. I don’t think it’s necessary to order all the plates, you just need to make sure that for every joint, the primary and secondary part are correctly ordrered. It does not really matter if the joints are not inserted in “reading order”, as long as they are all created in the end.
I see your plates are parallel, this will be very helpful. We can use one of the plates to define a “local” coordinate system of the beam grid (they are rotated in the world system), that should allow to order plates from left to right.
SortPlates.gh (15.1 KB)
Also : if your plates have names to identify and sort them, remember that you can deconstruct this name in Grasshopper, then use
Sort Text to reorder the beams in the correct order.
Definitely I do not care that they are ordered in any way I just need the primary (left) and secondary (right) members to be aligned.
I tried to use your script before “studyng” the way it’s buitl : In my case the distance among the plates, at joints, is 0.020m I set 0.1 but nothing get selected. If I get it to 0.5m just for trying (line selection is not right) the area component gets in error as it waits for closed curves.
Should we use something else than curve middle (curve ends perhaps)?
This is the selection clicking on the cull index with tolerance set to 0.5 (the blue lines are the joints). NOTE that each segment is made by two distincts polylines (selected).
I just realized your plates may be beams and not ContourPlates.
Try this GH instead. This should order the beams at each joint (not only at the blue lines locations).
SortPlates.gh (12.4 KB)
If it still doesn’t work, could you bake all your plate boundaries/beam axis and upload either .3dm or internalize that in a curve component so I can solve this
With the blue lines also, so the filtering can be done !
that would come handy trouble is that the names are made by composition of segment_ subsegments and that they share the same name by group of thrree.
Question : How do I actually commit the object once reordering is done? I have done a test simply rearranging by a longitudinal curve which partially fix thing (especially for the first say 3 joints) but components are not generated although primary and secondary objects are aligned.
yes I have beams and not plates.
No luck anyway, I join a GH file with internalised curve. I’m not sur whether it is enough as I never did it. Let me know if you also need the .3d file (as I would need to do some cleaning).
Thank you !
Stiffeners.gh (119.4 KB)
There were two beams in the joints curve parameter, but aside from that I think I got the sorting to work.
You need to add the component at the end ! Don’t forget to remove the Flatten option on all inputs.
SortPlates.gh (134.7 KB)
For the record, you could use
Text Fragment to isolate a part of the string of text.
I think you are almost there but not quite yet.
Here is what I see at your last list item component.
Left hand side elements :
Right hand side elements:
Majority would fall outside the joint locations and some are not even head to head.
Slightly late I would like to thank this very competent user who once again manage to solve the issue. Thank you @magicteddy.
Despite not yet having any mean of name reference in TEKLA I post here the script in case anybody needs to make the same operation of automatic selection of members around reference lines.
SortPlates 4.gh (192.4 KB)