Jump to content
Developer Wiki and Function Reference Links ×

Keeping scripts synced across computers


Nik

Recommended Posts

This is a challenge. Since VW scripts are file based, in order to run them, you have to import them into a file. That means that you immediately have two copies, so you can no longer make changes in one place.

 

Probably the best option is to store the scripts in a file on a server in the Workgroup folder. Then each user can set that same workgroup folder and access the scripts relatively easily from the Resource Manager.

 

Other options welcome.

Link to comment

When developing a script, the last thing I do is check it on the other platform to make sure all the interface items look OK. In order NOT to have two copies of code to merge at the end, I use an $INCLUDE in the script to access the code from a file, so I only have to edit code on one machine and both machines can see it. This works across a network, though the $INCLUDE format on Mac and PC differ in syntax. The only downside is that the first time a script executes across a network it may be a little slow to start. After it runs once, it is cached on the local machine and runs quickly until the file is closed and reopened,  or VW restarted.

 

You may want to assemble everything in a Workgroup folder as Pat suggests, but any folder shared on a network will work. This may not be the best way, but it works for what I need it to do. 

 

There are caveats to how scripts run from script palettes vs. from menu commands. If you need help with that, just ask.

 

Other options welcome.  ;-)

 

Raymond

Link to comment
  • 2 weeks later...

I guess it depends on how complicated of a setup you are looking at.  There are obviously methods with central servers that people above are using if you have numerous computers to keep updated.

 

I keep everything VW synced between my home iMac and my MacBook using a program called Chronosync.  Essentially, it runs a few times a day and copies whatever files have changed between the VW user folders on each computer, using the most recently changed as the master.  I've been doing it for years and have not had any issues.  Scripts, workspaces, and preferences all update on both computers.  

 

I do not know if this is scalable to more than the two computers, but it probably could be with some planning.

Link to comment

Another option, if you are Mac based would be to wrap all of the scripts inside Applescripts. The Applescripts could then be stored on a server or synced to local machines. 

 

Or convert all of the scripts to Plug-in Menu commands. Store these in the Workgroup folder and add them to everyone's workspace. When you update the PIOs in the Workgroup they will be pushed to everyone. I don't know if this would be live or only take effect during the next restart of VW.

 

These are the only ways I can think of to remove the file specific nature of scripts in VW.

Link to comment
  • 1 month later...

Another way, if on a Mac, you could keep a master Plugin Folder and a master Workspaces folder on your server.  Then make an Alias of each folder.  Rename the aliases exactly "Workspaces" and "Plugins".  Copy these aliases into each user folder and replace the Workspaces or Plugins folders that are already there.

 

Now when you launch Vectorworks on each workstation, if your sever is not mounted to your desktop, when Vectorworks loads the workspaces and plugins, it will automaticaly mount the server and access the master folders from your sever and load the contents as vectorworks starts up.

 

When you need to edit you workspace or plugin folder, just do it on the server.  The next time Vectorworks is launched on each workstation the contents will be updated.

 

Actually, you can just edit the folders in your own user folder, since they are really aliases pointing to the server and will change the contents on the server master folders.  The other workstations will still have to restart Vectorworks to see the changes.

Edited by PeterT
Link to comment

PeterT's idea would probably work by putting the Plugin and Workspace folders on something like DropBox. I would probably leave the real folders where they are and put an alias/shortcut in the Dropbox folder.

 

The problem with this is that you don't really control the distribution. If someone who is using the folder adds or deletes a plug-in or workspace, then that will be broadcast to everyone. Does not give you as much control to be able to determine who can use what. 

 

I don't know if there will be a problem about parameters being over written by effectively sharing a single folder. It could be annoying to have a wall set to a certain set of parameters and either in the middle of using it or the next time you restart VW having them be completely different. 

 

If you are going to try this test it thoroughly before you do a full roll out.

Link to comment
  • 2 months later...

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...