ObjectARX
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Problem with solid->extrudeAlongPath(region,path)

1 REPLY 1
Reply
Message 1 of 2
Anonymous
247 Views, 1 Reply

Problem with solid->extrudeAlongPath(region,path)

Hi there,

I have a big problem with the AcDb3dSolid memberfunktion : extrudeAlongPath.
My Application WORKS if I use solid->extrude(region,height,0.0)
But when I use solid->extrudeAlongPath(region,path) AutoCAD crashes.

So the Error has something to do with the "const AcDbCurve* path"

***********************************************************************
virtual Acad::ErrorStatus extrudeAlongPath(const AcDbRegion* region,const
AcDbCurve* path);
region Input pointer to a region object
path Input pointer to a curve object to extrude alongĀ“
************************************************************************


Here my code fragments:

AcDbArc Arc;
Arc.setNormal(AcGeVector3d(1.0,0.0,0.0));
Arc.setCenter(AcGePoint3d(0,200,0));
Arc.setStartAngle(PI2);
Arc.setEndAngle(PI);
Arc.setRadius(200);

AcDbCurve* path=&Arc; // I think here is the Problem !

AcDb3dSolid* solid = new AcDb3dSolid();

// extrude the region
////////////////// extrude(region,200,0.0); WORKS
solid->extrudeAlongPath(region,path); ////// ERROR
pBlockTableRec->appendAcDbEntity(ObjId,solid);
solid->close();

Thank you
David
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Hi David,

The path must be a database resident entity, otherwise extrudeAlongPath()
will fail. DevNote 37173 - Creating and modifying AcDb3dSolid objects (on
ADN website and PointA Customization Channel) includes some sample code for
using this function.

Cheers,

Stephen Preston
Developer Technical Services
Autodesk



"David Skiba" wrote in message
news:1D33D27959A9B9847431C4889A56FC81@in.WebX.maYIadrTaRb...
> Hi there,
>
> I have a big problem with the AcDb3dSolid memberfunktion :
extrudeAlongPath.
> My Application WORKS if I use solid->extrude(region,height,0.0)
> But when I use solid->extrudeAlongPath(region,path) AutoCAD crashes.
>
> So the Error has something to do with the "const AcDbCurve* path"
>
> ***********************************************************************
> virtual Acad::ErrorStatus extrudeAlongPath(const AcDbRegion* region,const
> AcDbCurve* path);
> region Input pointer to a region object
> path Input pointer to a curve object to extrude alongĀ“
> ************************************************************************
>
>
> Here my code fragments:
>
> AcDbArc Arc;
> Arc.setNormal(AcGeVector3d(1.0,0.0,0.0));
> Arc.setCenter(AcGePoint3d(0,200,0));
> Arc.setStartAngle(PI2);
> Arc.setEndAngle(PI);
> Arc.setRadius(200);
>
> AcDbCurve* path=&Arc; // I think here is the Problem !
>
> AcDb3dSolid* solid = new AcDb3dSolid();
>
> // extrude the region
> ////////////////// extrude(region,200,0.0); WORKS
> solid->extrudeAlongPath(region,path); ////// ERROR
> pBlockTableRec->appendAcDbEntity(ObjId,solid);
> solid->close();
>
> Thank you
> David
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

ā€Boost