.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Customizing Audit command in C#.net

5 REPLIES 5
Reply
Message 1 of 6
deep_1984
1332 Views, 5 Replies

Customizing Audit command in C#.net

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

 

5 REPLIES 5
Message 2 of 6
Artvegas
in reply to: deep_1984

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.
Message 3 of 6
deep_1984
in reply to: Artvegas

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

Message 4 of 6
Artvegas
in reply to: deep_1984

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.
Message 5 of 6
dgorsman
in reply to: deep_1984

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.


Message 6 of 6
deep_1984
in reply to: deep_1984

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost