Jump to content
KN_Michael

Place to save global data

Recommended Posts

We are currently saving some global data like some settings and also our internal file version inside the drawing header. The file version is used to convert our own data between our code versions.

 

We have problems though with this solution with referenced files and also with working files. Whenever a referenced file is updated or we call refresh inside a working file, we must convert the new data from the referenced file or the project file if we are in a working file. Yes, this data can't be saved, but we must update it temporarily so that our tools and plugins continue working because they are designed in way in which they expect all data to be updated to the newest version.

 

We run our conversion routine whenever the current document is changed, a new file is opened and also if a reference is refreshed or a working file is refreshed.

 

Problem

We can't access the drawing header of the referenced file or from the file that belongs to the objects that are refreshed in a working file, but we would need to know what the file version is there to decide, which convert function we must run on those refreshed objects.

 

Question

Is there another way to save file based data even if we are using referenced files and project files?

Share this post


Link to post

For exactly the same reason I did save this data within the plug-in itself. I attached the data to the object handle itself or using parameters.

Because the objects are accessible you can determine versions etc..

Share this post


Link to post

We do this as well but in some old plugins (older than 10 years) we did not do this yet. And additionally we sometimes make conversions that do not depend on the objects version but on the files version (some global conversions)..

Share this post


Link to post

You can use record formats for storing data and browse via resource lists. I believe the record format can't be hidden to show up in the resource list.

For referenced files, you may be able to access resources, though.

Share this post


Link to post

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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...