twk Posted May 6, 2015 Share Posted May 6, 2015 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 Quote Link to comment
Hippocode Posted May 6, 2015 Share Posted May 6, 2015 I think the closest you can get is to create a menu that can update old versions of your plug-ins in the active drawing. Quote Link to comment
twk Posted May 6, 2015 Author Share Posted May 6, 2015 Oh ok. Is there a VW function for updating plugins or do I need to write a script to copy identical parameters from the old plugin to the new one? Thanks again Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted May 6, 2015 Vectorworks, Inc Employee Share Posted May 6, 2015 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. Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted May 6, 2015 Vectorworks, Inc Employee Share Posted May 6, 2015 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. Quote Link to comment
twk Posted May 6, 2015 Author Share Posted May 6, 2015 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. Quote Link to comment
Vectorworks, Inc Employee Matt Panzer Posted May 7, 2015 Vectorworks, Inc Employee Share Posted May 7, 2015 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. :-) Quote Link to comment
twk Posted May 7, 2015 Author Share Posted May 7, 2015 (edited) 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 May 7, 2015 by TuiWalker Quote Link to comment
twk Posted May 7, 2015 Author Share Posted May 7, 2015 (edited) 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 May 7, 2015 by TuiWalker Quote Link to comment
Hippocode Posted May 7, 2015 Share Posted May 7, 2015 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. Quote Link to comment
Hippocode Posted May 7, 2015 Share Posted May 7, 2015 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. Quote Link to comment
twk Posted May 7, 2015 Author Share Posted May 7, 2015 Thanks H, I will try that. Quote Link to comment
Recommended Posts
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.