New Member
1 Posts
0 Kudos
Registered: ‎11-19-2005
Post 1 of 2

type (object -> AcadRegion) Conversion Error in C#

195 Views, 1 Replies
01-17-2006 04:29 AM

I'm in trouble with the following data type error :
(VS 2003, C#, AutoCAD2006)
profile[0] = (AutoCAD.AcadEntity)pline;
object region = app.ActiveDocument.ModelSpace.AddRegion(profile);
box = app.ActiveDocument.ModelSpace.AddExtrudedSolid(region[0],10,0);
I'd appreciate to your recipe.

Distinguished Contributor
303 Posts
1 Kudo
Registered: ‎09-26-2004
Post 2 of 2

Re: type (object -> AcadRegion) Conversion Error in C#

03-22-2006 01:03 PM in reply to: komodors
Try this code:
Object[] regs = (Object[])app.ActiveDocument.ModelSpace.AddRegion(profile);
foreach (AcadRegion reg in regs) {
box = app.ActiveDocument.ModelSpace.AddExtrudedSolid(reg,10,0);

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!