Anyone know if it is possible to get to profile preferences without COM api? So that I can read settings like what version to save the file as...
I noticed that preferences are only exposed in COM api, and I'd hate to bring COM api in just for this little thing, not that there's anything wrong with COM api, i just don't want to deal with another reference.
Thanks,
Viktor.
You can use COM objects without having to import the COM references,
but it's a bit more involved in C# (In VB, it works the same way it did in
VBA, declaring COM objects as 'Object' and using late binding).
In C# late binding requires calls to InvokeMember() on the object returned
by calling GetType() on a COM object.
There should be some examples here, and searching on 'InvokeMember'
should turn them up.
Thanks Tony, trying to do that now. I know in some cases with AutoCad if you don't reference the library you won't get the same results, as I found out some things like zoomextents don't work well with late binding, or maybe it was just me.
I very much doubt that late binding would have different results than
early binding, unless there is some discrepancy in the arguments passed,
whcih are not type-checked by the compiler as they are with early binding.