I a trying to develop a plugin in .Net. I want to put a unique identifier to each drawing file. Because if the user has changed the file name , i should be able to identify my original file. So i need to add some file id to each drawing file . How do i implement this ? Which is the best mechanism? I tried it using DSOfile,but the custom attributes included is missing after saving the file.
I'm not sure if exists a definitive solution to this problem, but i imagine at least 2 ways to go:
1.- Put some xdata in a non graphic object, like layer "0", will be difficult to find by common users, non directly selectable, and you can't get rid of layer "0"
2.-Add a digital signature to the drawing.
A .dwt basiclly is a dwg file but initiates all the timer variables and creates Guid for each document created. There is a database property
Database.FingerprintGuid which is a GUID created when a drawing is created from a dwt.
If you store that it should be the same for any file name change etc.., but for SaveAS you would then muliple drawings with same guid.
Or, add a dictionary to the drawing with an XRecord. Generating a GUID should give a reasonable expectation of uniqueness. Like most solutions, this also has the problem of being removeable by those in the know. You might want to consider a reverse-flag type system, where the *absence* of an identifier is used to identify a copy.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register