Jump to content
Sign in to follow this  
FredM

Beginner Question

Recommended Posts

Can someone please post a simple script that creates and extrudes a basic rectangle? I think that'd be a good place for me to begin to understand the structuring aspect of scripting. Also Is there a dictionary-type layout of all of the commands somewhere out there? Thanks.

Share this post


Link to post

if you are looking to get started you should learn how the structure of algorithms work. Then you will find it easy to move into VectorScript. Something like Teach Yourself Algorithms by Ralston and Neill[b/] published by Hodder and Stoughton 1997. This book is listed in Amazon.com.

Try the VectorWorks help. Look for VectorScript Function Reference.

Share this post


Link to post

Here is a basic script to draw a rectangle and extrude it. It also sets the view to left Isometric so you can see the extrude.

Procedure MakeBox;

var X1,Y1,Z1:Real; {define the variables}

Begin;

X1:=120; {Set the value for the variables}

Y1:=120; {120 = 12 inches x 10 feet}

Z1:=120;

BeginXtrd(0,Z1); {Start makeing the 3D object}

Rect(0,0,X1,Y1); {Draw the rectangle to extrude}

EndXtrd;

DoMenuTextByName('Standard Views',9); {Set the view to Left Iso}

End;

Run(MakeBox); {required at end of procedure. Name must match}

Pat

Share this post


Link to post

Thank you Pat! There looks to be endless possibilities with vectorscript. I've got some learning to do.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×