Design Script Question

Hey guys,

I’m in the process of learning to use DesignScript through the Code Blocks and ran into this little problem. I’m not sure if i’m missing something really simple or not.

When trying to use certain functions such as CoordinateSystem.XYplane in the Code Block, i’m confused as to the inputs required and why it pushes back the error “Warning: Cannot find static method or constructor”.

Below is an example of what I mean showing two different methods.

Cheers,

Jeremy.
Test

Every node you call in a codeblock expects the same number of inputs as the node itself. I’m quite new to this myself, but I think you have to define b=Point.ByCoordinates(a,0,0) so that Coordinatesystem.ByOrigin(b) will work. Either that or you have to define 3 inputs in the Coord.byorigin.

Thanks Jostein but the problem doesn’t seem to be with CoordinateSystem.By Origin, this part of the code works just fine. That is exactly why i assumed CoordinateSystem.XYPlane would work in the same fashion. Unfortunately it doesn’t even though the node only requires a coordinate system as the input.

Ok, but what is the b input in the CoordinateSystem.ByOrigin pointing to?

Sorry Jostein, you are right, that was a mistake as i quickly threw that example together. Below shows what i mean with that error updated.

cheers,

Jeremy

Test2

try c.XYPlane()

Hey Michael,

 

unfortunately that didn’t seem to do it although it does make sense. shown below.

Capture

 

 

20140809-1

Regards,

Vikram Subbaiah

Yep, ,that does the trick, thanks Vikram.

1 Like

Hello Jeremy Graham;

Try this c.XYPlane;

As it is a property on CoordinateSystem so it should work like this.

Will provide you more details tomorrow once I am in office.

Thanks,

Ritesh

XYPlane

That works fine too, thanks Ritesh!