Power function in Code block

Formula in Code Block

Dear all,

How to use the power function in code block? Kindly see attached.


Power function in Code block Power function in Code block

Hey Chander,

try typing Math.Pow(x,y)

x being the number and y being the power.

Hello Chander Gupta,

All Math operations in Dynamo need to be used by writing Math. and method which you want to use.



Hi guys,

Thanks for your reply.

Math.Pow(x,y) works perfectly…


It works just nicely…

Thanks Again

Power function in Code block

Hello Chander Gupta,

One suggestion, in your graph you have written X and Y in separate CBN and then connected to formula written in CBN.

Actually you dont have to create X and Y, you can directly pass output of Range expression (1…10…1 and 1…20…2) to your CBN where you have written Formula.

Keep using Dynamo, if stuck we are here to help you. :slight_smile:



Oh yes…

x & y CBN is redundent.



Multiple Functions in Code BlockInteresting !!

hi chander

Im was looking at your last image in this topic

Im working with points trough a spline and i trying to figure out how can i manage to control the distance between the points similar to what you got, in my case i want to change the Z axis,

Any ideas, Thanks man