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

converting a .NET Object to a COM Object?

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
459 Views, 2 Replies

converting a .NET Object to a COM Object?

I have a: (.NET)
Autodesk.Aec.DatabaseServices.DBObject

that needs to be a: (COM)

Autodesk.AutoCAD.Interop.Common.AcadObject

I'm getting a error in my VB.NET expression:

'cannot convert to an AutoCAD Interface Object'...

how can I convert?
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Hey Corey,
DBObject instances have an AcadObject property. It returns on Object, but
this can be cast to a Autodesk.AutoCAD.Interop.Common.AcadObject.
--
Bobby C. Jones

"Corey A. Layton" wrote in message
news:5197751@discussion.autodesk.com...
I have a: (.NET)
Autodesk.Aec.DatabaseServices.DBObject

that needs to be a: (COM)

Autodesk.AutoCAD.Interop.Common.AcadObject

I'm getting a error in my VB.NET expression:

'cannot convert to an AutoCAD Interface Object'...

how can I convert?
Message 3 of 3
Anonymous
in reply to: Anonymous

Bobby C. Jones wrote:
> Hey Corey,
> DBObject instances have an AcadObject property. It returns on
> Object, but this can be cast to a
> Autodesk.AutoCAD.Interop.Common.AcadObject.

thank you, Bobby.

getting .AcadObject from the DBObject was all I needed!

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