Author Topic: ObjectDBX  (Read 4077 times)

0 Members and 1 Guest are viewing this topic.

Chuck Gabriel

  • Guest
Re: ObjectDBX
« Reply #15 on: September 29, 2006, 02:35:26 PM »
Sorry you couldn't use what I posted.  Maybe somebody else will find it useful.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: ObjectDBX
« Reply #16 on: September 29, 2006, 03:34:06 PM »
I'm sure they will Chuck .. :lol:
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Humbertogo

  • Guest
Re: ObjectDBX
« Reply #17 on: October 04, 2006, 02:10:40 AM »
his solution is using the ReadDwg() method    :-D   

                                           Editor editor = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
         Database db = new Database();
         db.ReadDwgFile("c:\\test.dwg",System.IO.FileShare.ReadWrite,true,""); //make sure drawing exists
                                                db.Measurement
                                               
« Last Edit: October 04, 2006, 04:24:59 AM by Humbertogo »

MikeJarosz

  • Guest
Re: ObjectDBX
« Reply #18 on: October 27, 2006, 06:46:15 PM »
Since ObjectDBX is most useful with unopened drawings, and AutoCADs' System Variables are either stored in the drawing or at the application level, why (if I may be so bold to ask) would you want to read them?

Just wondering what you're trying to do.

The question wasn't specific to Acad. The Windows environment variables can be very useful to a programmer. The user's name, machine ID, login time and a wealth of other info can be determined from the environment. I regularly write logfiles from my applications, and I include the user, the application, date, time etc in the log file. Some of this info can only be obtained from the environment. And the user doesn't have to know your doing it!

I'm not sure Acad variables can be changed in objDBX, since I only started usingDBX. But in Acad VBA, I regularly read and alter Acad variables. For example the units can be set or reset, the precision determined, snaps turned on and off. I'd be lost without this ability.