.NET

Reply
Valued Contributor
Paulio
Posts: 82
Registered: ‎06-26-2008
Message 1 of 5 (693 Views)
Accepted Solution

Help with AuditInfo constructor

693 Views, 4 Replies
08-13-2010 03:32 AM

Can anyone help me with the constructor for the AuditInfo please?

 

I think I need to use AuditInfo.Create(type as system.type,unamanagedPointer as System.IntPtr, autoDelete as boolean) but I don't know what I should pass to it.

 

Can't do:

Dim ai As New AuditInfo()

 as "Sub New is not accessible in this context because it is 'Friend'"

 

I've had a look around but can't find a sample anywhere.

 

TIA

Valued Contributor
Paulio
Posts: 82
Registered: ‎06-26-2008
Message 2 of 5 (689 Views)

Re: Help with AuditInfo constructor

08-13-2010 04:36 AM in reply to: Paulio

OK. Got a bit further.

 

After a bit of (un)educated guessing I came up with this:

            Dim ai As AuditInfo = AuditInfo.Create(GetType(AuditInfo), db.UnmanagedObject, True)
            db.Audit(ai)

 but now I'm getting an 'eNotImplementedYet' error.

 

I finally figure out the constructor and then find out I can't use it yet! (unless I still haven't got the constructor right)

 

Is there no way to programmatically audit a database? I would use Tony T's commandline but can't becuse I'm looping through drawings in a folder which requires my commandmethod to have the sessionflags.

Valued Mentor
caddzone
Posts: 305
Registered: ‎01-26-2005
Message 3 of 5 (680 Views)

Re: Help with AuditInfo constructor

08-13-2010 06:59 AM in reply to: Paulio

See the native ObjectARX docs for AcDbDatabase::audit

 

It's not implemented.

 

You can still use CommandLine to run AUDIT, but isn't that command

indeterminate (e.g., you can't anticipate what prompts it will issue) ?

 

For batch processing, you can use the classes in this sample,

which also solves the syncronous command problem:

 

  http://www.caddzone.com/AcBatchProcessSample.zip

 

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Valued Contributor
Paulio
Posts: 82
Registered: ‎06-26-2008
Message 4 of 5 (675 Views)

Re: Help with AuditInfo constructor

08-13-2010 07:28 AM in reply to: caddzone

Awesome! Thanks Tony.

 

I'd love to know how it works though!

Distinguished Contributor
wesbird
Posts: 351
Registered: ‎12-05-2003
Message 5 of 5 (552 Views)

Re: Help with AuditInfo constructor

09-16-2010 01:07 PM in reply to: caddzone

Hi Tony:

  I tried your code, I found there are 2 files missing: Application.cs and ExtensionApplicaitonInfo.cs so I cannot compile it. Would you kindly provide a update version. I learn a lot from your code. I will keep doing so. Thank you so much.   

 

 

Wes

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.