Customizing Audit command in C#.net

Customizing Audit command in C#.net

Anonymous
Not applicable
2,384 Views
5 Replies
Message 1 of 6

Customizing Audit command in C#.net

Anonymous
Not applicable

Hello,

There are some problems while attaching xrefs in Autocad 2013 it shows "eduplicaterecords" error and "Invalid" while attaching manually. But the functionality is working good in Autocad 2012 and below editions of Autocad.

This error is getting resolved when i  use "audit" command for Autocad 2013. So i want to customize this command.

Please help.

 

Regards,

Sandeep

 

0 Likes
2,385 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
I don't quite understand what you are asking. I assume the errors you refer to occur when you run your code? Without knowing the details, the eDuplicateRecord exception would indicate to me that you are trying to add an xref that already exists in your drawing? Why can't you fix your code? In terms of audit you could look into the Database.Audit() and DBObject.Audit() methods. I haven't looked at these myself.
0 Likes
Message 3 of 6

Anonymous
Not applicable

I have this error while attaching xrefs with the code db.AttachXref() method. This works fine for Autocad versions 2012,11,10. But it is not working for 2013. It works fine for autocad 2013 when i do audit command from autocad menu.

So thats why i wan to customize audit command in .net before attaching xref with db.AttachXref() menthode.

 

Regards,

Sandeep

0 Likes
Message 4 of 6

Anonymous
Not applicable
Strange that it's not working for AutoCAD 2013 as I don't remember there being any documented changes to this part of the API. Anyways you could send AUDIT to the command line using Document.SendStringToExecute(). Depending on your requirements you might need to do this synchronously - i.e. using the COM interop AcadDocument.SendCommand() method and specifying CommandFlags.Session so that your code runs in the application context.
0 Likes
Message 5 of 6

dgorsman
Consultant
Consultant

Check the AutoCAD 2013 board, there have been problems reported with XREFs so I don't think its something in your programming.  I recommend waiting until the first SP to see if it has been adressed before trying to hard on a work-around.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 6 of 6

Anonymous
Not applicable

Yes I will. I managed to this by giving error message to user. Thanks 🙂

0 Likes