Create Point from Cursor Click in Civil3D Model Space

Hello,

Does anybody know if there’s a way to create a point in Dynamo by selecting a location in model space in Civil 3D and gathering the x,y,z coordinates from the cursor click? I know that you can select an existing point in Civil 3D and get that info into Dynamo, but I’m trying to find a way to create a prompt in Dynamo Player that will allow the user to select a point on either side of a line to place blocks and orient them accordingly. As of now, I have a boolean input for the user to choose if the blocks should be oriented to the left or right of the line, but I would prefer to have the user click a point and for that information to be read to Dynamo as an x,y,z point instead.

Thanks in advance!

Not what you are asking for but a workaround encase this is not possible (your question is beyond me). You could have them select an object on one side of the line. Then get its center and have dynamo calculate the closest point. Food for thought.

Hope its helps,
Steven

@mbrayN4L27 you can via Python and the AutoCAD API.

Select a Point.dyn (3.6 KB)

9 Likes

Good idea @Steven - thanks for the reply!

This is awesome, thanks for the info @Paolo_Emilio_Serra1 ! I’ll try this out.

Follow up: did exactly what I needed! Thanks again.

Hi. Is there a way to use the point from that Python script as an input? I don’t know if I’m explaining myself well.
I’m trying to put the sum of lengths of polylines with a given property as a text in a point picked by tht user. I made some progress but I don’t know how to make that point an input. I’m attaching my dyn to make my point. Thanks in advance.
longitudesPS.dyn (37.0 KB)

@raul.07.11 look in the Civil 3D Toolkit package, there is a node to select a point.

1 Like

Hi @mzjensen ! I am using this node, it works fine with the editor open but flickers and refuses to work within dynamo player, any ideas ?

It’s been an issue for a long time, unfortunately. No solution that I know of.

1 Like

I have noticed the same issue. Guess the best solution is just to create a noplot block or circle and use select and get the insertion/center.

1 Like