.NET

Reply
Active Member
betak
Posts: 10
Registered: ‎12-05-2005
Message 1 of 3 (87 Views)

BlockTableRecord not found in COM interop wrappers

87 Views, 2 Replies
12-05-2005 04:21 AM
Hi all,

I'm referencing autocad 2006 type library and objectDBX in my c# solution and also I use following:

using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.Interop.Common;

but I'm not able to find anything about Database/TransactionManager/BlockTableRecord etc..
I'm able to draw elements only through ModelSpace.AddPolyline ... and similar functions and it's a bit slow

I've tested same functionality using NETLOAD and objectARX using TransactionManager and BlockTableRecrd and it was much faster. Problem is I cannot use it as internal process (my dll cannot be loaded through netload)

Is there a way how to get interface to databaseServices or ApplicationServices.workingDatabase in c# through COM wrappers ?

Thans,
R.
*Norman Yuan
Message 2 of 3 (87 Views)

Re: BlockTableRecord not found in COM interop wrappers

12-05-2005 11:33 AM in reply to: betak
Database/TransactionManager/BlockTableRecord etc are ObjectARX API, they are
not available in Acad COM object model. You must use ObjectARX or ObjectARX
.NET API to access them, as you've already known. You may make your own COM
Wrapper to expose these objects, so that you can use them in your Acad COM
automation, though.

wrote in message news:5029019@discussion.autodesk.com...
Hi all,

I'm referencing autocad 2006 type library and objectDBX in my c# solution
and also I use following:

using Autodesk.AutoCAD.Interop;
using Autodesk.AutoCAD.Interop.Common;

but I'm not able to find anything about
Database/TransactionManager/BlockTableRecord etc..
I'm able to draw elements only through ModelSpace.AddPolyline ... and
similar functions and it's a bit slow

I've tested same functionality using NETLOAD and objectARX using
TransactionManager and BlockTableRecrd and it was much faster. Problem is I
cannot use it as internal process (my dll cannot be loaded through netload)

Is there a way how to get interface to databaseServices or
ApplicationServices.workingDatabase in c# through COM wrappers ?

Thans,
R.
Active Member
betak
Posts: 10
Registered: ‎12-05-2005
Message 3 of 3 (87 Views)

Re: BlockTableRecord not found in COM interop wrappers

12-06-2005 04:05 AM in reply to: betak
Any idea how to implement this ?

I've tried to make DLL (which is loaded by netload) register for COM interop, but build in .net 2003 crashes when attributes like [CommandMethod("xxx")] or [assembly: CommandClass(typeof(JigSample.xxx))] are used. Anyway to register c# class library for COM interop assembly must have strong names, and this applies also to referenced assemblies - acmgd.dll and acdbmgd.dll :smileysad: . So i don't think this is a way

Have you any idea how to get reference from outside to loaded assembly which should expose Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Database ?
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.