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

BlockTableRecord not found in COM interop wrappers

2 REPLIES 2
Reply
Message 1 of 3
betak
263 Views, 2 Replies

BlockTableRecord not found in COM interop wrappers

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.
2 REPLIES 2
Message 2 of 3
Anonymous
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.
Message 3 of 3
betak
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 😞 . 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 ?

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