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

How to get user preferences (options) without COM api?

3 REPLIES 3
Reply
Message 1 of 4
ViktorCAD
594 Views, 3 Replies

How to get user preferences (options) without COM api?

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.

3 REPLIES 3
Message 2 of 4
caddzone
in reply to: ViktorCAD

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.

 



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


Message 3 of 4
ViktorCAD
in reply to: ViktorCAD

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.

Message 4 of 4
caddzone
in reply to: ViktorCAD

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.



AcadXTabs for AutoCAD
Supporting AutoCAD 2000-2011


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