Jump to content

Scripting/ Getting Started/ Advice, etc.


Recommended Posts

Hello,

 

I’m wanting to start to push the boundaries of what can be done with Vectorworks, and am seeking direction for best practices, Scripting resources, and or any additional materials that you may deem helpful in this endeavor. 
 

Really looking to program repeat tasks and sequences that I currently use in my daily workflow.

 

And I would like to be able to develop a customized “super” template that has a centralized repository for all future drawings to save time on production efforts.

 

Which language should be best utilized from a programming point of view, and is there recent documentation for the most current release?

 

Thanks,

Ryan Russell

Link to comment

You have just opened a can of worms asking about which language. Best depends on many things.

 

1.  Do you have any programming experience?  If not, it will be easier to find Python training to learn the basics. If you have any Pascal experience then go with Vectorscript.

2. Do you intend to access data from outside of Vectorworks? If so then use Python.

3. Do you intend to write scripts that will require user interaction with your drawing? If so then Vectorscript may be the better choice. Python has limitations in how it can access the user interactive functions built into Vectorscript.

4. You may find more people on the list who can help with Vectorscript than Python, but there are many helpful people on both sides and both can offer help to the others on items that are not language specific.

5. How good of a typist are you? Python is Case Sensitive (variable, VARIABLE, Variable refer to three different things), White Space sensitive (indentation determines when sub procedures start and end VS uses explicit Begin/End statements), and Interpreted. Vectorscript is Compiled and will alert you to many errors at compile time where Python will not show those errors until you try and run the program.

 

The items in 5 (plus 30+ years of working in it) are the main driving factors keeping me in VectorScript.

 

Asbestos Underware mode on for the coming flames. 😉

  • Like 2
Link to comment

What Pat said.  Vectorscript (VS) is clearer and easier.  Python has better string handling (I'm told), and programming requires a lot of string handling.  However, for me, dealing with the lack of a debugger and a lack of requiring explicit variables and variable types, would make my life hell.  There are many people who do a lot of really cool scripting with Python, so I have to think that I'm just too old and lazy to learn another program language syntax.   I already know Basic, PL-1, Forth, and Pascal, but I would venture into the SDK and the C++ compiler before dealing with Python.

Someday I should tell you how I really feel.😊

  • Like 1
Link to comment

Agree with all of what Pat and Sam Jones said. With regards to your specific questions:
 

I’m wanting to start to push the boundaries of what can be done with Vectorworks, and am seeking direction for best practices, Scripting resources, and or any additional materials that you may deem helpful in this endeavor. 
- This forum, and the vectorworks dev wiki (link stickied in scripting forum), are your best resources. Vectorworks also ships with a PDF for the vectorscript language.

 

Really looking to program repeat tasks and sequences that I currently use in my daily workflow.

- This can be done with all three routes, ie Vectroscript, Python, C++

 

And I would like to be able to develop a customized “super” template that has a centralized repository for all future drawings to save time on production efforts.

- Depending on your actual specifics, template scripting has been attempted in the past. Search the forums. There were some pitfalls users faced.

 

Which language should be best utilized from a programming point of view, and is there recent documentation for the most current release?

- Which language? from a programming point of view? all three of them will help you, and the recent documentation is on the Vectorworks Dev Wiki.

 

My experience with the languages are as such:
Vectorscript
Pros:
- Native debugger within Vectorworks.

- You can script in user-interactivity easier than using Python

- Native vectorworks language
Cons

- Explicit variables(yes this is contrary to what Sam mentioned 😁)

- Intermedia learning curve if new to programming

 

Python

Pros:

- Easy learning curve. Plethora of tutorials online

- Access to every external library from the python development community

- Faster development testing (in my tests)

- Debugging can be done in an external ide with code error checking, syntax highlighting. (I use PyCharm, but there are others out there)

Cons

- Hard to script in user-interactivity

 

C++

Pros:

- You have more access to the Vectorworks under-the-hood functions

Cons:

- Steep learning curve. (I have yet to dive into this one. But when I will....)

 

I spent about 2 years learning and developing plugins using vectorscript, when python support came out, I spent 1 year learning python, and then abandoned vectorscript, and develop solely in python ever since.
But if you've read the forums you'd see alot people still using vectorscipt and others python.

Well that was a round-about-post to say: "It all depends.." 

 

 

Edited by twk
  • Like 2
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...