KN_Michael Posted February 12, 2021 Share Posted February 12, 2021 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? Quote Link to comment
Hippocode Posted February 12, 2021 Share Posted February 12, 2021 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.. Quote Link to comment
KN_Michael Posted February 15, 2021 Author Share Posted February 15, 2021 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).. Quote Link to comment
JBenghiat Posted February 28, 2021 Share Posted February 28, 2021 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. 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.