Place CogoPoints on crosslines with the correct Layername

Hi all,

I’m trying to get the correct layer sorted for where i place a Cogopoint. I already made a dynamo script(see under), where I can make a Cogopoint on the intersection from polylines on my Alignment.

But i can’t figure out how to sort out the layernames so that the Cogopoints get the name of the polyline that crosses the Alignment.

any help would be appreciated!
Place_CogoPoints_02.dyn (67.6 KB)

There is probably a language barrier here, your polyline has a name?
at a stab i’d say you probably need something like Element.SetParameterByName

I don’t use Civil3D but this looks like it might help.

Hi pyXam,
As a example:
i have my main alginment, and i have 3 polylines with the layer’s 1 2 and 3. Now these polylines are crossing my alignment, and i want a point created on these crossings. I can do this with the script above. Now i need something that gets these layers (1, 2 and 3) and give the points the same layers as the polylines. My scripts does it half OK, it can take the layers from ALL polylines, but it cant figure out what point connects with what polyline. So now it just puts the layers on a random point that is not sitting on the right polyline…


You can see that the layer from the line isnt the same as the point, but i want it to be the same layer. This is bassicly what my goal is

Ok doesn’t sound impossible, can you take a screenshot of your graph working with this button.
make sure you are zoomed all the way into a node when you press the button.
image


With names, it didnt show them in the previous one

Check the levels for the the point.byCoordinates, could be some issues there.
According to the layers, add the "setLayer after the node where you create the cogopoints and see if that works
I also recommend that you add the cogopoints to a pointgroup with the polyline layer name instead of the cogo points because the point layer isn’t that important because when you export the points it will be the style that set the layers for the point and labels, not the layer that you set for the cogo point.

This doesn’t work. The problems sits in the Object.Layer function. It just gets all the layers from all the polylines, but if 1 polyline crosses the alignment multiple times it already makes this node irrelevant. the rest of the script works fine, its just the layer that makes me crazy :frowning:

Amigo @C.N.v.d.Zwaag buenas, can you share your dwg?
You have to ask the layer of each line or repeat the layer the same quantity of lines of each policurve, then you just have to grup and clean your data and ask for the intersection and create the cogopoints; hard labor i know!!

TEST.dwg (2.2 MB)

It only seems to not work on the one i already made a screenshot from. I just dont understand why, and for the real deal i need hunderds of these intersections made and sorted, so i cant have any of those wrong layernames in my cogopoints :roll_eyes:

Amigo @C.N.v.d.Zwaag Rebonjour. There you have it, as usual it is a problem of lacing lists and levels, as I mentioned before organizing the information is hard work; I will leave you my bank details in private message!! hehe just kidding.
I advise you to look for information on the topics of Lacing and Levels, although be careful, levels are the way to the dark side!

4 Likes

You are a legend! Thank you so much :smiley:

1 Like

:stuck_out_tongue: You make me blush, I’m glad to hear you found it useful, see you next time Amigo!! :+1: