Cable/wire lengths

Hello everyone.

Has anyone been able to extract the exact length of a wire, where it takes into account the entire length, not just startpoint-endpoint distance? As far as I can tell, the API has only methods that use startpoint-endpoint, so even if you have 1000 meters of wire drawn for an instance of a wire, and the startpoint-endpoint is just 2 meters apart, the parameter is just 2 meters.

Best regards,
Eirik Kyvik Gulliksen

What Parameters are available out of the box?

What does Element.Geometry return? If nothing you could get the vertices from the element, convert them to DS points and rebuild the geometry in Dynamo as a similar nurbs curve and then get the length of that curve.

Thanks for the input. I managed to extract the underlying points, but I ran into some trouble as I had to use a Python script to extract the underlying points, and they are extracted as objects in the API, and Dynamo doesn’t really like that too much. It also turns out that wire geometry doesn’t have a Z-coordinate. I guess I’ll have to add in the Z difference between the connected equipment to get a good length. The bad news is that all equipment has to exist in the same view for the wires to be of any use, and if the wires run up and down a lot between the equipment, this is impossible to detect, as wires only exist in 2D. All in all my experience so far is that wires in Revit are basically glorified detail lines. Not impressed.

Anyway, here’s what I got. Output is in feet, even though the project units are mm, but that’s just how the API works.