Hi all,
I couldn’t find an example of returning data as tree from a python hops function, and I’m wondering how should this be done.
Tried returning a dictionary in the same format as three input looks like, but it didn’t work =(
Here is an example of what I tried:
@hops.component(
"/curve_end_points",
name="EndPoints",
nickname="EndPoints",
description="Get curve start/end points",
icon="beamupUserObjects/icons/bmd_level.png",
inputs=[
hs.HopsCurve("Curve", "C", "Curve to evaluate")
],
outputs=[
hs.HopsPoint("S"),
hs.HopsPoint("E"),
hs.HopsNumber("EE", "EE", "test")
]
)
def end_points(curve: rc.Curve):
start = curve.PointAt(0)
end = curve.PointAt(1)
return (end, start, {"{0}": end.X, "{1}": start.X})
And I’m getting this error in gh:
Solution exception:Input string was not in a correct format.