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

Help with AuditInfo constructor

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Paulio
1409 Views, 4 Replies

Help with AuditInfo constructor

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

4 REPLIES 4
Message 2 of 5
Paulio
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.

Message 3 of 5
caddzone
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


Message 4 of 5
Paulio
in reply to: caddzone

Awesome! Thanks Tony.

 

I'd love to know how it works though!

Message 5 of 5
wesbird
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

Windows 10 64 bit, AutoCAD (ACA, Map) 2023

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