Definition method not found

I’m starting to learn some DesignScript Definitions but my method is not found, this link is all I found on the subject, but my example is a bit simplier of an example so I am having an issue using the link as a reference to why my method is not found.

I also notice different ways to write a functions, where by in the example link no beginning or ending quoates are used but my example uses quotes, I assume this is because of different versions of Dynamo are used but not sure?

Why is my method not found?


Hi @cadman6735

Try this:

1 Like

@Kulkul is correct - by including your entire definition inside the " you are effectively outputting a string. Wire the node with the definition into a Watch node and an Object.Type node and you’ll see what we mean.

Thanks guys,

I understand my error now

adding the = after return and removing the " resolved my issue. In the link the very first code block function does not use an = sign after return, which I assume this is a versioning difference?

I also got confused with an example I tried using to start my journey with was an example of python code in a code block which used the quotes. I started with python and switch my thoughts to DS functions, this with the confusion of the equal sign, I got all messed up.

Thanks again.,

Please mark the post as solved. You’re welcome!