Hi,
What am I doing wrong?
start=plane.Origin
end=(plane.Origin.Y+100)
if end:
vect=(end-start)
rs.MoveObject(arrow_b,vect)
Error message: unsupported operand type(s) for -: ‘float’ and ‘Point3d’
plane.Origin.Y+100
is a number.
I expect you want something like:
start=plane.Origin
end=rs.coerce3dpoint([plane.Origin.X,plane.Origin.Y+100,plane.Origin.Z])
if end:
vect=(end-start)
rs.MoveObject(arrow_b,vect)
Thanks!
I tried to find the meaning of “coerce” but with no luck. Can you explain what that means?
Look at this post:
The same question was asked before you will find your answer there
1 Like
Willem
(Willem Derks)
5
Hi Thomas,
This might help conceptualize what these methods are intended for:
coercion [kō′ər·shən]
(computer science)
A method employed by many programming languages to automatically convert one type of data to another.
source:
HTH
-Willem
I will search better in the future…
it’s no problem I do the same all the time as long as you get your answer