Jump to content
Developer Wiki and Function Reference Links ×

Updating Plugins through Versions


Recommended Posts

Greetings all,

I was wondering how the other plugins get the neat Plugin Updating thingy when you're opening a file from an older version of vectorworks in the new version. For eg, Windoor Obj, Frame Obj.

I have some plugins re written that I'd like to replace older versions when they're opened in the newer vectorworks.

Is this an automatic thing or are there some backend coding required?

Thanks in advance

Tui

Link to comment
  • Vectorworks, Inc Employee

The best way, IMO, is to keep the plugin name identical between versions so that the plugin automatically updates when new plugins are installed. The plugin can store its own version number in a hidden parameter. This way the plugin can check to see if the stored version matches it's current version. If not, it can even run some type of update procedure if needed to convert the old version to the new. After the first regen, the version parameter will then be updated to the current new version so any update procedure will only run on the first regen.

Link to comment
  • Vectorworks, Inc Employee

Ok. I admit my comment may be a bit cryptic. That's what I get for typing on my iPad.

Basically, if the plug-in name is the same between versions the plug-ins will simply use the installed version. When you install a new version (or open in a new VW version using a newer version of the plug-in), any plug-ins in the file will suddenly become the new plug-ins.

As I mention in my previous message, there are cases where you might need to make adjustments to bring the old plug-in version over to the new version. In that case, you can use an internal procedure to do that (assuming you store the version number in a parameter).

Hopefully that makes a little more sense.

Link to comment

Thanks for input Matt, thats where my dilemma is I think. The naming of plugins part you mentioned.

When I started out writing plugins I named them as Section Wall 14, etc. And when I had updated for the next version of Vectorworks (because of the new & depreciated functions) I changed the names to Section Wall 15, etc.

Now you mentioned to stored the version number in a hidden parameter. That I understand. But your mention of the checking and updated procedure, do you mean a script to copy parameters and replace old plugins that are on the drawing?

If I'm understanding you correctly Matt, I will need to rethink my naming conventions from now on, and my existing plugins can't really benefit from any code changing?

Sorry if I sound confusing, would be so easier to use a video or sthg to relay my question. Lol.

Link to comment
  • Vectorworks, Inc Employee

You're welcome Tui,

The update procedure would be built into the plugin's code. You would only need this in special cases. If the plugin was named the same, all placed plugins would retain any parameter values as long as they exist in the new plugin version. So updating would basically be automatic.

In the case of having a new plugin name, I think you would need to write a separate script to replace the old paced objects with the new ones and have it transfer all parameter values. Definately consider keeping the plugin name consistent between versions in the future. :-)

Link to comment
You're welcome Tui,

The update procedure would be built into the plugin's code. You would only need this in special cases. If the plugin was named the same, all placed plugins would retain any parameter values as long as they exist in the new plugin version. So updating would basically be automatic.

In the case of having a new plugin name, I think you would need to write a separate script to replace the old paced objects with the new ones and have it transfer all parameter values. Definately consider keeping the plugin name consistent between versions in the future. :-)

Ha! Yep, thats the road I'm on. :)

Appreciate the help Matt!

Edited by TuiWalker
Link to comment

While this is still fresh,

I noticed that the Windoor Plugin's name on the Object Info Pallette is not the same as its plugin file name.

Object Info Pallette = 'Windoor'

File Name = 'WinDoor 6.0'

How do we acheive this naming style?

This would be a good way for me to track Plugin versions across the office computers.

Thanks in advance!

Edited by TuiWalker
Link to comment

I still think you need to code your convert script in a seperate menu command.

When you change the parametric record of your plug-in Vectorworks will disable the info palette of the plug-ins containing the old parametric record. I don't think these can be reset again so they might need some external help to match the new parametric record.

This doesn't happen on each field change, not sure what exactly triggers it. Adding a field won't do harm I guess, changing the fieldtype might be.

Link to comment
While this is still fresh,

I noticed that the Windoor Plugin's name on the Object Info Pallette is not the same as its plugin file name.

How do we acheive this naming style?

I think you can change the filename in explorer. Vectorworks will still recognize it with the old name internally.

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