Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 08/10/2017 at 12:26, xxxxxxxx wrote:
Hello plugincafe,
a friend of mine asked me to write a litle plugin, where he can see how long he as wored on a project. My Idea was to get the creation date/time of the document and the current time in order to get the time between those.
Now to my question:
import c4d from c4d import gui #Welcome to the world of Python def main() : bc = doc.GetDocumentData() print bc.__getitem__(c4d.DOCUMENT_INFO_DATECREATED) if __name__=='__main__': main()
This script should get me the creation date of the document. But the returned value seems to be quite large, and the python datetime module does not seem to take in such large numbers.
I just don't know, how to correctly format this returned long value. Because it doesn't seem to be in milliseconds or any other formats I know.
Am I just missing something, or is there a specific formation going on?
regards, Florian
On 09/10/2017 at 03:12, xxxxxxxx wrote:
Hi Neon, thanks for writing us.
The fastest way to retrieve the information you're looking for is to use
doc.GetParameter(c4d.DOCUMENT_INFO_DATECREATED_STRING,c4d.DESCFLAGS_GET_0)
Best, Riccardo