beginner here with dumb questions!

This is the place for queries that don't fit in any of the other categories.

beginner here with dumb questions!

Postby kerber.g » Sun Nov 17, 2013 1:36 am

hi all! I'm new and forgive me for that but i gotta start someplace and already i'm confused... I've been watching tutorials and can follow them nicely but when i try to veer off into my own path nothing works like I thought it would. I am trying to apply python in Rhino using rhinosyntax...
I type this :
Code: Select all
import rhinoscriptsyntax as rs
pt1 = rs.AddPoint(4,4,0)
pt2 = rs.AddPoint(4,14,0)
l = rs.AddLine (pt1,pt2)

and it works great it adds 2 points and makes a line! Awesome
but when i type this:
Code: Select all
import rhinoscriptsyntax as rs
#create line
def c(a,b,c):
    a=rs.AddPoint(2,4,0)
    b=rs.AddPoint(4,14,0)
    c=rs.AddLine (a,b)
    return (a,b,c)


it does nothing... please What is wrong ... so simple i'm sure but i could use a pointer. THANKS -ethan
Last edited by stranac on Sun Nov 17, 2013 1:55 am, edited 2 times in total.
Reason: Added code tags. Locked.
kerber.g
 
Posts: 1
Joined: Sun Nov 17, 2013 1:22 am

Re: beginner here with dumb questions!

Postby stranac » Sun Nov 17, 2013 1:57 am

Looks like you're not calling the function.
Also, don't give the same name to the function and an argument.
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
stranac
 
Posts: 1137
Joined: Thu Feb 07, 2013 3:42 pm


Return to General Coding Help

Who is online

Users browsing this forum: bill z and 4 guests