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

Is this equiv to objdbx from vb6?

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
267 Views, 4 Replies

Is this equiv to objdbx from vb6?

Hi,
Found this snippet which appears to be equivalent to using obj dbx interface
to open dwgs without using editor. just wanted to confirm this is how one
would do (in c#) what one did with GetIntefaceObject(objdbxversion)
Editor ed =

AcAp.Application.DocumentManager.MdiActiveDocument.Editor;


string dwgPath = @"c:\Drawings\tmp.dwg";

Database db = new Database(false,true);


db.ReadDwgFile(dwgPath,

FileOpenMode.OpenForReadAndAllShare, false, string.Empty);
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

Right.

Be sure that you call Dispose() on the Database when you're done with it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6251575@discussion.autodesk.com...
Hi,
Found this snippet which appears to be equivalent to using obj dbx interface
to open dwgs without using editor. just wanted to confirm this is how one
would do (in c#) what one did with GetIntefaceObject(objdbxversion)
Editor ed =

AcAp.Application.DocumentManager.MdiActiveDocument.Editor;


string dwgPath = @"c:\Drawings\tmp.dwg";

Database db = new Database(false,true);


db.ReadDwgFile(dwgPath,

FileOpenMode.OpenForReadAndAllShare, false, string.Empty);
Message 3 of 5
Anonymous
in reply to: Anonymous

Thanks Tony,
re Dispose, I read somewhere you need to call that unless you're in a
transaction in which case the transaction does it automatically...or
something to that effect...is that right?
mark

"Tony Tanzillo" wrote in message
news:6251699@discussion.autodesk.com...
Right.

Be sure that you call Dispose() on the Database when you're done with it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6251575@discussion.autodesk.com...
Hi,
Found this snippet which appears to be equivalent to using obj dbx interface
to open dwgs without using editor. just wanted to confirm this is how one
would do (in c#) what one did with GetIntefaceObject(objdbxversion)
Editor ed =

AcAp.Application.DocumentManager.MdiActiveDocument.Editor;


string dwgPath = @"c:\Drawings\tmp.dwg";

Database db = new Database(false,true);


db.ReadDwgFile(dwgPath,

FileOpenMode.OpenForReadAndAllShare, false, string.Empty);
Message 4 of 5
Anonymous
in reply to: Anonymous

What you read is about objects within in a database,
not the database itself.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6252279@discussion.autodesk.com...
Thanks Tony,
re Dispose, I read somewhere you need to call that unless you're in a
transaction in which case the transaction does it automatically...or
something to that effect...is that right?
mark

"Tony Tanzillo" wrote in message
news:6251699@discussion.autodesk.com...
Right.

Be sure that you call Dispose() on the Database when you're done with it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6251575@discussion.autodesk.com...
Hi,
Found this snippet which appears to be equivalent to using obj dbx interface
to open dwgs without using editor. just wanted to confirm this is how one
would do (in c#) what one did with GetIntefaceObject(objdbxversion)
Editor ed =

AcAp.Application.DocumentManager.MdiActiveDocument.Editor;


string dwgPath = @"c:\Drawings\tmp.dwg";

Database db = new Database(false,true);


db.ReadDwgFile(dwgPath,

FileOpenMode.OpenForReadAndAllShare, false, string.Empty);
Message 5 of 5
Anonymous
in reply to: Anonymous

Thanks again, i was a little hazy on that...just starting out
mark

"Tony Tanzillo" wrote in message
news:6252408@discussion.autodesk.com...
What you read is about objects within in a database,
not the database itself.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6252279@discussion.autodesk.com...
Thanks Tony,
re Dispose, I read somewhere you need to call that unless you're in a
transaction in which case the transaction does it automatically...or
something to that effect...is that right?
mark

"Tony Tanzillo" wrote in message
news:6251699@discussion.autodesk.com...
Right.

Be sure that you call Dispose() on the Database when you're done with it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

"mp" wrote in message
news:6251575@discussion.autodesk.com...
Hi,
Found this snippet which appears to be equivalent to using obj dbx interface
to open dwgs without using editor. just wanted to confirm this is how one
would do (in c#) what one did with GetIntefaceObject(objdbxversion)
Editor ed =

AcAp.Application.DocumentManager.MdiActiveDocument.Editor;


string dwgPath = @"c:\Drawings\tmp.dwg";

Database db = new Database(false,true);


db.ReadDwgFile(dwgPath,

FileOpenMode.OpenForReadAndAllShare, false, string.Empty);

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