Dear all,
I have a warning message on my script which I would like to eliminate. The script runs fine despite the warning.
The purpose of the overall script is to show influence zones of trees on a site plan, these zones are different sized circles for each tree, and sometimes they overlap.
Part of the script merges the circles and then produces a list of arc groups and circles (image 1), each contiguous group is annotated with a specific number (image 2) which is why the list order needs to remain intact. The script sorts the arcs and circles to find the centrepoint with the highest y value.
This list is then fed into the below code block which is giving me the warning “Asked to convert non-convertible types”
DSCore.Object.Type(list) == "Autodesk.DesignScript.Geometry.Arc" ? DesignScript.Arc.Radius(list) : DSCore.Object.Type(list) == "Autodesk.DesignScript.Geometry.Circle" ? DesignScript.Circle.Radius(list) : "";
Is there some way I can alter this code block to prevent the warning (image 3)?
The code is meant to say if the object is an arc then get the arc radius, and if it’s a circle then get the circle radius; likewise for the centrepoint.
I was trying to do this by splitting the list into the 2 types and then stitching them back together but I couldn’t get it to work.
I know it’s not ideal to have a mixture of types in one list but I couldn’t think of another way.
image 1
image 2
image 3





