I’m new in Dynamo and I already searched a lot on internet to find an answer to my question but unsuccessfully…
I’m working on a Python Script and I want to use the “Curves” methods (Curve.StartPoint, Curve.Length, etc) that we can find in dynamo nodes. I added all the possible and inimaginable “import …” at the beginning of my Python Script and I can use other Design Script Methods but not the ones I need. Does someone have a solution for that ?
Hello @Mostafa_El_Ayoubi, thank you for your answer !
But it’s already what I’m doing and in fact it works for a lot of methods (like Line.ByStartPointEndPoint) but it doesn’t work for curves methods like Curve.Length, Curve.StartPoint, Curve.EndPoint, …
It is possible that there are other functions called Length , StartPoint etc. in the other libraries you imported, resulting in the interpreter being incapable of knowing which function you’re calling (I may have not phrased that correctly, but I think it’s the general idea)
@Mostafa_El_Ayoubi is right, so in these cases you have to specify the reference assembly, namespace, class then the method. A good example is Plane.ByOriginNormal. To use in Python you have to declare the following otherwise it throws an exception:
Here is the beginning of my code, I take as input argument the curves representing the bases of my walls and I try to get the StartPoints in my Python Script