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

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

1 REPLY 1
Reply
Message 1 of 2
komodors
427 Views, 1 Reply

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

Hi,

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.

jsko.
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: komodors

Try this code:
[code]
Object[] regs = (Object[])app.ActiveDocument.ModelSpace.AddRegion(profile);
foreach (AcadRegion reg in regs) {
box = app.ActiveDocument.ModelSpace.AddExtrudedSolid(reg,10,0);
}

[/code]

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