A DGN element has a field lastModified (last time this element was changed) in its header (Elm_hdr).
lastModified
Elm_hdr
Does a DGN model have a similar timestamp?
There is an outstanding Enhancement Request 85695 requesting to see 'date-modified' column to the Models dialog. Need to check.
Regards
Carl Myhill
Technical Support Engineer
Bentley Systems
Answer Verified By: Jon Summers
Just to confirm currently we do not write timestamp on DGN model.
Hi Jon Summers,
FWIW. If you truly need more granularity than e.g. The DgnFile GetDocumentProperty (see note below), then the only other feasible work-around could be to use the Microsoft IStorage::Stat API that inherently provides updates to the underlying STATSTG FILETIME struct properties for: Created (ctime), Modified (mtime), and Access (atime) times.
NOTE: GetDocumentProperty in the MDL V8 SDK provided a listing of propIDP macros (like: PIDSI_LASTSAVE_DTM; in mdl\include\docproperty.h) that continue to use the same name/values (see MicroStationAPI.chm Help topic for code snip), though are not currently published in the MicroStation CONNECT SDK. I will see if we can get these added. MicroStation V8's docproperty.h is attached for convenience. I suggest implementing only required macros to keep compilation and compatibility issues to an absolute minimum.https://communities.bentley.com/cfs-file/__key/communityserver-discussions-components-files/343173/docproperty.h
HTH,Bob
Robert Hook said:If you truly need more granularity than e.g. The DgnFile GetDocumentProperty
That's a file property, not a DGN model property. This a request from the MicroStation Insiders Forum, which I followed up by examing the API. DGN elements have a timestamp, but DGN models don't (or they don't have a publicly-accessible timestamp).
Regards, Jon Summers LA Solutions
Robert Hook said:the only other feasible work-around could be to use the Microsoft IStorage::Stat API that inherently provides updates to the underlying STATSTG FILETIME struct properties for: Created (ctime), Modified (mtime), and Access (atime) times.
Hi Jon,
At this time the only feasible work-around is to use the Microsoft APIs directly to obtain model date time information; until a public API may become available. If you can provide some insight into the workflow/need you are trying to achieve I could add this to the enhancement which may help accelerate the priority behind it.
Bob
Robert Hook said:use the Microsoft APIs directly to obtain model date time information
I don't understand. What Microsoft API can peek inside a DGN file to view a DGN model's properties? If a lastModified property doesn't exist, using a Microsoft API won't conjure it from nowhere.
Robert Hook said:provide some insight into the workflow/need
What's not clear about Carl Myhill's response above? The question arose because users have asked to see a creation date column in the MicroStation Models dialog.
Because a DGN model doesn't have a timestamp, that wish cannot be fulfulled. If a DGN model class had a lastModified field, just like a DGN element, that would be easy to solve.