@tom.k wrote:
Hi all, this is my first post.
I am a Rhinoceros user, firstly, I started using this programme for work, I had no CAD background prior to using, but a decent amount of Geometry / Vector / Math knowledge, and some limited coding know-how. I have really grown to like this programme a lot.
Anyway, so far, I have sped up a lot of my workflow with the use of macros.
I am wanting to start automating further, with the help of Rhinoscript. The vast majority of my work is in 2D. So to get to grips with syntax, I want to start with inputting data assigned to variables, to create rectangles, then manipulating, moving and offsetting these from the variables I have defined.
I am falling at the first hurdle, as I know what I need to do, but do not quite understand how to work the syntax / “pass” the data
For instance, to create a rectangle, I know I first need to define a centre point, width, and height. How do I then pass the information into the "Rhino.Command “_Rectangle” command?
This is what I have started with so far:
Dim arrCentre
arrCenter = Rhino.GetPoint(“Center point of Rectangle”)
Dim intRectangleW, intRectangleH
intRectangleW = “w” & Rhino.GetReal(“Rectangle Width”)
intRectangleH = “w” & Rhino.GetReal(“Rectangle Height”)Rhino.Command “_Rectangle” & intRectangleW & intRectangleH
I understand I might have missed a step in the last line, for when I enter the “Rectangle” command into the command line, before I enter any co-ordinates, I first need to select “3Point.” How do I do this with Rhinoscript?
Any pointers going forward would be greatly appreciated, I understand Python is perhaps a more comprehensive language, but VBscript / Rhinoscript is something I would very much like to get to grips with first as I use a lot of Excel in conjunction with Rhino.
Thanks very much in advance everyone.
Posts: 3
Participants: 3