Jump to content
Developer Wiki and Function Reference Links ×

script size and networking


Recommended Posts

2 Questions:

1. I have attempted to combine two fairly large scripts (800+ lines) into one. I've discovered that when the new script reaches a certain size, everything after approximately line 1200 will disappear when I re-open the script for editing. Is there a size limit to scripts or is this some sort of bug?

2. We have a six-seat license for Vectorworks. Is there a way that I can put PIOs on our network after I edit them, rather than having to drop them individually into each machine's Plugin folder?

Link to comment

Hi Ben,

Regarding your first question: There is a 32K limit on scripts that are run from script palettes. There is no such limit for scripts that are executed from PIOs (menu commands), or scripts that are referenced via the $Include comment. It must be a VS Editor limit, not a compiler limit.

Use the $Include comment as the first (and only) line of your script in the VS. It references a file that contains the rest of your script. You may also use $Include many times in your files. I don't know of a limit there, or more accurately, I haven't reached it yet and I have used over 50 in my Reshaper program and it is over 250K. It normally runs from a PIO, but I just tried it from a script palette and it works there, too.

Here's an example of a script calling a larger script file:

{$Include \Drive name\VW Cmds\Project 1\Test File.px }

There's only one line in the VS, which references the file "Test File.px". You can use the editor of your choice, as long as it's not the VS Editor. The \ delimeter works on both Mac and PC.

Be sure to set Tools > Scripts > VS Compiler Mode to compile EACH time, or it will cache your program the first time it is run and no changes you make in your editor will take effect until you close and reopen the VW file. When you are done debugging your script, set the mode back to FIRST time, and things will speed up.

HTH,

Raymond

Edited by MullinRJ
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...