Text.Create block input needs Vector, not CoordinateSystem


I’m very novice with Dynamo, and I’m stuck on the “block” input on Text.Create. In previous scripts I’ve been able to use Document.ModelSpace as the input, but I’m getting an error with this script saying it needs Autodesk.DesignScript.Geometry.Vector and not Autodesk.DesignScript.Geometry.CoordinateSystem.

I’m not sure what to plug in. Any help would be appreciated.

Model space is correct. The issue is with another input - my guess is the Rotation is off. Try swapping that Curve.CoordinateSystemAtParameter node with a Curve.TangentAtParameter node.

1 Like

I did the swap and I get this error:
Warning: Text.Create expects argument type(s)
(string, Autodesk.DesignScript.Geometry.Point, double, Autodesk.DesignScript.Geometry.Vector, string, string, string, Autodesk.AutoCAD.DynamoNodes.Block),
but was called with
(string, Autodesk.DesignScript.Geometry.Point, double, Autodesk.DesignScript.Geometry.Vector, string, int, string, Autodesk.AutoCAD.DynamoNodes.Block).

To me, that seems like it is saying the same thing other than the “” after point. Don’t know what that means. The error only happens when I have the “Block” plugged in, otherwise nothing happens.

The [] is indicating a list of the object types.

As a tip: copy the contexts to a string node for the expected input and provided input. Then use a List.Create node followed by a String.Split node where the split string is , . Then use a List.Transpose node to show ‘what it wanted’ above ‘what it got’.

In this case if you read the last three inputs the issue is clear.

The expected are string, string, block.

The provided are int, string, block.

So double check the third input from the end. Looks like you’re using a vertical alignment for the horizontal and another text method for the vertical.

1 Like

Agree with @jacob.small but to be sure, please add a new screenshot of the updated graph. It makes it easier to review.


Looks like we are in business! It is picking up a bunch of null data from somewhere, but the script works as expected. Using string nodes as opposed to Code Blocks seemed to clear things up.

I didn’t follow what you said about using List.Create, String.Split and List.Transpose unfortunately though. I got this to play with so I feel better now that it is functional, and I’ll give it another shot later as I try and figure out more.

Thank you for the help!

The null appears because you probably have other objects than the PolylineExtension.GetGeometry can handle, as you see in my example the node gets Polylines, Circle and texts as a input and return null for the texts.
Depending on the purpose you can get “All Objects of Type” and then filter in Object Layer

1 Like