Dynamo pile coordinate script HELP

Any dynamo experts out there that can help me? i created a dynamo script a few years ago that assigns x y z coords to structural foundation families in my model. Each year i upgrade the script with the latest add ins. However when i do this from 2024 to 2025 the script does not work anymore. Could someone have a look at this for me?

I have created a post on the autodesk forum with my script attached if that helps as i cant attach on here due to been a new member

Script attached.

Many thanks in advance

what warning did you get?

1 Like

Are you on the latest update of 2025?

1 Like

Hi, yes, all updates are installed

Can you post your about menu for Revit and Dynamo? Likely will need this to escalate to the Revit product team.

1 Like

Looking at the watchnodes producing nulls, makes me think the custom node "Convert from internalOrigin CoordinateSystem isnt working right.

Can you trace this back by checking every output a node gives. If it’s the custom node: open the node, copy all the nodes inside to the current script and test it there. I suspicion is a Python node set to Cpython3 or IronPyhton that should be the other way around. Or just a Python node that isnt up to date with the current API-version

1 Like

im not sure how to do that as i am not very experienced using dynamo. I have attached the script on the revit forum, see link below

The custom node is dependent on which package you have installed. I can not be sure if I have the same version of the package as you, so I’m afraid you have to do the troubleshooting :slight_smile:

Right-click on the custom node (Convert from internalOrigin CoordinateSystem) and then click on ‘Edit Custom Node…’. This will open the node-editor in Dynamo.
Select everything inside the custom node, copy paste the content of the custom node into your dynamo script.
Now attach the the content the same way as you attached it to the custom node.

1 Like

The SetParameterValue() method in the GitHub repo only has overloads for double, Element, int, string and bool. The NumberToString nodes are chucking nulls. Replace with the built in Math.Round and Object To String nodes

1 Like

Ok, so the issue wasn’t with Revit but something else (though Revit needs to surface a different error here).

Which package is Convert From Internal Origin Coordinate System from? My guess is that is using IronPython2, which isn’t supported in Dynamo 3.0 and up which was released with Revit 2025. Make sure you have the right version for your build installed - hopefully the team has cleared up which version is needed for which build in the package manager description by now, but you want the latest version now. You may have to restart Revit to uninstall the conflicting version.

1 Like

Genius Loci. OP Script on Autodesk forum ‘2021.11.10’ current ‘2024.5.29’
Edit from the node pbp = basePt.get_BoundingBox(None).Min is unusual way to get the XYZ why not basePt.Position? looks like the bounding box method is depreciated
Change

# Collect Project Basepoint...
basePt = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_ProjectBasePoint).FirstElement()
pbp = basePt.get_BoundingBox(None).Min

to

# Collect Project Basepoint...
basePt = BasePoint.GetProjectBasePoint(doc)
pbp = basePt.Position
1 Like

Hi Mike, im not very experienced using dynamo so finding it difficult to understand what i need to do. After reading all you nice peoples replys, i think i need to replace the “Convert from InternalOrigin CoordinateSystem” with a newer version?

Upgrade to latest Genius Loci first
Then change the python in the node if it’s still not working (see reply to Jacob)
Alternate try CPython3 or get and try IronPython3 from the Package Manager

1 Like

I have the updated Genius Loci and then installed the IronPython3 as the other suggestions dont work.

Do i need to replace the “Element.setparameterbyname” with the one shown on the right of this screenshot?

Not likely. Do you h e results from the custom node noted above yet? If not nothing after that point will work.

Preview the results from the ‘convert’ node noted above and if it is anything but the transformed points you’re still in a misconfigured Dynamo environment. You need the right package version and dependencies for your Revit and Dynamo build.

1 Like

Start here - you are filtering everything out
image
It also appears that Structural Foundations do not have a Location - so for arguments sake we can take the centroid of the geometry

import clr

clr.AddReference("RevitNodes")
import Revit

clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import Options

options = Options()

points = (
    [
        sld.ComputeCentroid()
        for sf in UnwrapElement(IN[0])
        for sld in sf.get_Geometry(options)
    ]
    if isinstance(IN[0], list)
    else [sld.ComputeCentroid() for sld in UnwrapElement(IN[0]).get_Geometry(options)]
)

OUT = [p.ToPoint() for p in points]

The NumberToString nodes do not work (they are from 2020) - so replace with this to avoid dynamo double to string not truncating trailing zeros

if IN[1] and isinstance(IN[1], int):
    rnd = IN[1]
else:
    rnd = 3

def stringify(num, rnd=rnd):
    return str(round(num, rnd))

OUT = map(stringify, IN[0]) if isinstance(IN[0], list) else stringify(IN[0])

Finally ensure you have the latest IronPython2.7 package installed (3.2.1 for R2025)
With Dynamo Nodes

1 Like