Ctype

Ctype

Anonymous
Not applicable
1,079 Views
1 Reply
Message 1 of 2

Ctype

Anonymous
Not applicable

Can someone please help me, I'm trying to convert an Autodesk.AutoCAD.Interop.Common.AcadObject to Autodesk.AutoCAD.DatabaseService.RotatedDimension in VB.

 

Thanks in advanced

 

Steven Houghton

0 Likes
1,080 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor

While AutoCAD .NET API provides a way to connect its class objects to reach their counterparts in COM API (via XXXXXXX.AcadObject property), the opposite is not true: there is no way to cast COM's AcadObject back to an .NET class object.

 

However, if you do have the AcadObject in your .NET API code (with COM interop code mixed, of course), you could use AcadObject's ObjectId/Handle to obtain the .NET API's ObjectId and then open the corresponding .NET object in a transaction.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes