Moving start- and endpoint of wires (electrical cables) in specific view

Hello world!

I just started with Dynamo this year.

My intention is to move the start- or endpoint of an electric cable in Revit.

Unfortunately I read that this only works with Pyton because cables are view specific:

But I can’t find the Pyton-syntax for the functions Wire.GetVertex and Wire.SetVertex.
How do I integrate them into my Pyton script so I can use them in Dynamo?

Hi there! Good luck on your journey using Dynamo, its a great tool.

If you are just starting out, try the basics first, suggest looking through dynamo primer and some youtube training before delving into integrating python.

Note: “Cables” (Revit Conduit) are different from Revit “wires”, not sure which one you mean.

Also, check out some of the existing MEP custom packages, (eg MEPover, DynamoMEP) as there maybe relevant nodes to help you do this. I have seen a video of Cesare Caoduro routing electrical conduit through existing electrical cable tray via shortest route method, so its (mostly) possible!

Hi Daniel

I’ve already worked through the primer. I also know the video from Cesare.
It is not about conduits, they are not bound to one view. We use wires (as in the link above).
I actually didn’t want to start with Python yet. Only stupid that I am already dependent on it. Dynamo’s in-house methods are already reaching their limits with wires. Nodes like Geometry.Translate don’t work, Element.GetLocation returns incomplete data.
Handling wires in Revit is really a nightmare.
Look at the GIF.
All I want is for the last four clicks to be done automatically.

I can program an entire city for you with Dynamo now. But wires make me despair.

Thanks for the tip with the MEP packages. At the moment I’m trying out the RIE nodes.
I’ll probably have to look at some more packages.

@CADuceus, did you manage to get any further on this topic?

I have been recently looking into circuits & wires automation, and re-found this post.

The RIE package has nodes to generate the wires that I’ve used, but I agree that wires are annoying, and the location of the end point, and even the direction of the curve doesn’t always come out the way I expected. Also, I haven’t found a node yet that can define from which outlet the home run is defined.

hello there, i am also struggling with wire’s ends vertices(start,end), after wire is connected to a device they jump around.

I know the start/end point coordinates of the PolyCurve that generates the wire, but when i try and move the end vertices near those initial start/end points it all goes way off…

x,y,z are double values of the start/end point coordinates of the PolyCurve that generates the wire’s vertices.

for start vertex of wire:
wireN.SetVertex( 0, XYZ(x+0.5,y,z))
for end vertex of wire tried getting NumberOfVertices from wire then:
wireN.SetVertex( (NumberOfVertices - 1), XYZ(x+0.5,y,z)) and it still does not work… :frowning:

looks easy and correct but can’t figure it out.