Hi Kerry,
Thanks for your reply.
As I said before I'm newbie for customization for Autocad with C#. I don't have depth knowledge in both.
According to my requirement I'm studying and doing project.
well, Few weeks ago I search for "how to retrieve Date and Time", fortunately I found your previous code using [tdcreate] and I continue with yours. I did'nt come out of the box [TDCREATE]. After this post I came to know using "File.GetCreationTime" we can get date and time.
then I check this code, I can't retrieve the date and time which I pass the parameter filename.It retrieves date and time for drawing1.dwg or already opened file. ie. Current time
In your previous post
//Just for interest, can you demonstrate that the TDCREATE is different to the File.GetCreationTime(qualifiedFileName) ?//
I start checking/testing what is the difference between those two.
1. I copied already created drawing file from D Drive to C Drive. filename : 45895.dwg
2. Open C:\45895.dwg in autocad.
3. Use Autocad Command, "time" [retrieve both] [ Please check the image for reference]
a. Current time
b. times for this drawing
4. I run the below code.
[CommandMethod("T_time")]
public void TT()
{
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
DateTime fileCreatedDate = File.GetCreationTime(@"C:\430101S1239.dwg");
ed.WriteMessage("\nFile selected was \"{0}\".\n", fileCreatedDate);
}
5. It retrieve Current time ie. today date and time I copied to "C Drive"
6. Next I run "TDCreate" Code
7. It returns, "Times for this drawing" both "Created" and "Updated"
I think the difference is,
File.GetCreationTime(qualifiedFileName) returns
"Current time" "tdcreate" and "tdupdate" returns
"Times for this drawing".Thanks for your interest, because of your Interest I learn today something
Thanks a lot,
thenndral