Any trick how to select objects of sublayer? Iam baking geometries through Elefront
i have 2 sublayers with same name but they belong to different main layers. So, is it possible to refer to specific Layer and its child?
Your file do not have the layer structure you described.
Not sure if you want to select or reference geometry…
If you want to select geometry in identically named child layers quickly, you can do that by either using the child layer name as object name or by adding a user key and value.
Yes, in your suggestion, How is it possible to choose “Kansi” sublayer’s geometries which belong to “A” main layer?. if i just input “Kansi” to C#, then it will select all geometries regardless to where main layer they belong(By name).
I actually need GH approach. Iam developing through C# script which can read geometries by layers and sub layer’s names and then give each geometry IFC properties. So, iam combining multiple plugins API’s by C#.
My guess is, you have to check all Layer-Full-Pathes
then use
If you want to limit the result further use the Layer-Index as Filter for a FindbyFilter or GetObjectList…Include the object-types that make sense for your usage.
It’s very simple really, you first find the full layer path, then you search if the full_path_string contains the substrings “layer1_name” and “layer2_name”, if it does it contain both layer1 and layer2 you are getting an object which is in a specific sublayer (layer2) whose parent layer is layer1.
Just loop through all the objects that interest you should be very easy