TheSwamp

Code Red => .NET => Topic started by: mkweaver on May 27, 2008, 07:09:19 PM

Title: ObjectDBX and Text/MText justification
Post by: mkweaver on May 27, 2008, 07:09:19 PM
I know that modifying an attribute through objectdbx will change the displayed justification.  Can I work around this using VB.NET?  CSharp? Arx(C++)?

I would prefer VB.Net, but I seem to remember that this can't be done with ObjectDBX.

I'm not looking for a solution here, just need to know what I'm getting into and a nudge in the right direction.

Thanks,
Mike Weaver
Title: Re: ObjectDBX and Text/MText justification
Post by: T.Willey on May 27, 2008, 07:30:00 PM
Yes.  You have to set the database to the WorkingDatabase, but make sure to switch the WorkingDatabase back.  Here is my question about the same thing with some good advice from some smart people.

[ http://www.theswamp.org/index.php?topic=12035.0 ]
Title: Re: ObjectDBX and Text/MText justification
Post by: mkweaver on May 27, 2008, 09:30:13 PM
Thanks for the response.  I thought I had seen a thread about this before.

I take it that this approach maintains the main advantage of objectdbx, that being that the dwg is not opened in the editor.  If that is the case, then I think I am up and running.  I will need to convert your code in the other thread to VB.Net, but I think I can handle that.

Thank again, I'll post what I end up with.

Mike
Title: Re: ObjectDBX and Text/MText justification
Post by: T.Willey on May 28, 2008, 11:05:11 AM
I don't know if I would go that route.  I have since learned a few things, and the route I would go would be to open the drawings database with the ReadDwgFile() method on a new Database.

Example, where Str is the full path to the drawing you want to open.
Code: [Select]
Database db = new Database (false, true));
db.ReadDwgFile (Str, System.IO.FileShare.Read, true, null);
Title: Re: ObjectDBX and Text/MText justification
Post by: Glenn R on May 28, 2008, 11:36:13 AM
...and don't forget to Dispose() of that puppy...the dbase that is...