Selecting object

Hello!

I’m new to dynamo, but ran into problem I can’t solve myself. My goal is to make a program, that creates offset lines (4) from previously made polyline to measure car space need on roads and where are tyres on road. So its easier to place manholes on a road.
I have created four groups (code with picture below) - each group makes one polyline in drawing, with fixed offset and color. Vehicle left body line with inner wheel line and same on the right side.
With “select object” from dynamo interface everything works as needed, but I would like to make it work in a way, that i don’t need to change object from inside dynamo interface. Goal is to save time from offsetting.
As i did not find node to select object from model, when starting program, I tried different approach. I created a new layer and draw polyline in model. My idea was, that program selects every line on that layer and offsets them as needed, but i did not manage to get it to work.
Is it even possible to do something like that? Goal should be like this - white is handmade polyline and colors are program offsets to visualize car body and wheel inner line.

Goal should be like this


Program code picture

Amigo @Raul buenas. The package Civil3DToolkit has the node that you are looking for, besides to many other amaizing nodes, Camber and Arkance System Packages helps a lot to work in C3D!!

1 Like

Thanks for reply!
@gilberto.arechigaiba yes i know and i tested offsetting with that select.object node, but in that way i have to change object from inside “code” (dynamo interface). I’d like to use that program in different dwg drawings (dwg model view) and different polylines, without changing the code.

O i see, you want to use the script with out open dynamo is that? well no matter the method you use to select objects either manually or all objects in the layer, you must mark your node as an imput so you can open your script from dynamo player, if you want to manipulate several files with the same .dyn well maybe there is some way with the Camber package or with phyton

Hi @Raul

Based on the picture of your code. You seem to be really close to achieving what you’re looking to do. Like you did with the Left Wheel Group, you can connect the output of the All Objects on Layer node to all four of the polyline inputs of the PolylineExtensions.Offset node. You will also need to connect the Document.ModelSpace node output to the block inputs of the PolylineExtensions.Offset node as well. That should produce what you’re looking for. So something like this but connected to all the nodes:

I tried your approach @omar.g , but unfortunately it didnt work for me. I managed to create version 2, but in that way program would offsett all polylines in a drawing, so thats not working correctly either. Is there is a way to combine layer somehow into that?

Oh, i got it to work. I skipped document.layerbyname node and it worked as i wanted it to work. Thank you guys for helping me!