Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

polylines in arx

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
881 Views, 6 Replies

polylines in arx

how can I draw a polyline that consists of two arcs and to straight line in
an ARX program..........I am using 2000 I will need to extrude this entity
when done.

thanks in advance
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

One mor note..........I can draw these in regular lines if it might be
easier to explain how to change them to a pline


"Rob" wrote in message
news:D3D8C8E0481DE6503E0B670028806EFD@in.WebX.maYIadrTaRb...
> how can I draw a polyline that consists of two arcs and to straight line
in
> an ARX program..........I am using 2000 I will need to extrude this
entity
> when done.
>
> thanks in advance
>
>
Message 3 of 7
Anonymous
in reply to: Anonymous

AcDbPolyline *pPline = new AcDbPolyline();
// for the line segments
pPline->addVertexAt(0, AcGePoint2d(0,0));
pPline->addVertexAt(1, AcGePoint2d(5,5));
// for the curve
pPline->addVertexAt(2, AcGePoint2d(10,5), 0.5); // .5 is the "bulge factor"
pPline->addVertexAt(3, AcGePoint2d(20,10));
etc...

then...

AcDbBlockTable *pTable;
AcDbBlockTableRecord *pBTR;
acdbHostApplicationService()->workingDatabase()->getBlockTable(pTable,
AcDb::kForRead);
pTable->getAt(ACDB_MODEL_SPACE, pBTR, AcDb::kForWrite);
pTable->close();
pBTR->appendAcDbEntity(pPline);
pBTR->close();
pPline->close();


Tada....

Read through the example problems and online help that ship with the SDK -
they're wonderful!

--
Jon Rizzo
Langan Engineering and Environmental Services, Inc.
Message 4 of 7
Anonymous
in reply to: Anonymous

Im gonna need to to this with 3d points-------is there away to convert the
lines I have drawn to a pline??

Thanks for the info





"Jon Rizzo" wrote in message
news:5554B82837958DF459C16C7628558FC6@in.WebX.maYIadrTaRb...
> AcDbPolyline *pPline = new AcDbPolyline();
> // for the line segments
> pPline->addVertexAt(0, AcGePoint2d(0,0));
> pPline->addVertexAt(1, AcGePoint2d(5,5));
> // for the curve
> pPline->addVertexAt(2, AcGePoint2d(10,5), 0.5); // .5 is the "bulge
factor"
> pPline->addVertexAt(3, AcGePoint2d(20,10));
> etc...
>
> then...
>
> AcDbBlockTable *pTable;
> AcDbBlockTableRecord *pBTR;
> acdbHostApplicationService()->workingDatabase()->getBlockTable(pTable,
> AcDb::kForRead);
> pTable->getAt(ACDB_MODEL_SPACE, pBTR, AcDb::kForWrite);
> pTable->close();
> pBTR->appendAcDbEntity(pPline);
> pBTR->close();
> pPline->close();
>
>
> Tada....
>
> Read through the example problems and online help that ship with the SDK -
> they're wonderful!
>
> --
> Jon Rizzo
> Langan Engineering and Environmental Services, Inc.
>
>
Message 5 of 7
Anonymous
in reply to: Anonymous

well, an AcDbPolyline is a 2d object, so you have to give it 2d points.

you can draw an AcDb3dPolyline using 3d points, but they cannot have arc
segments. If I am not mistaken, you can't extrude a 3d polyline, either...


--
Jon Rizzo
Langan Engineering and Environmental Services, Inc.


"Rob" wrote in message
news:131DCC0125B7B651F9649EC6DDD36FEE@in.WebX.maYIadrTaRb...
> Im gonna need to to this with 3d points-------is there away to convert the
> lines I have drawn to a pline??
>
> Thanks for the info
>
>
>
>
>
> "Jon Rizzo" wrote in message
> news:5554B82837958DF459C16C7628558FC6@in.WebX.maYIadrTaRb...
> > AcDbPolyline *pPline = new AcDbPolyline();
> > // for the line segments
> > pPline->addVertexAt(0, AcGePoint2d(0,0));
> > pPline->addVertexAt(1, AcGePoint2d(5,5));
> > // for the curve
> > pPline->addVertexAt(2, AcGePoint2d(10,5), 0.5); // .5 is the "bulge
> factor"
> > pPline->addVertexAt(3, AcGePoint2d(20,10));
> > etc...
> >
> > then...
> >
> > AcDbBlockTable *pTable;
> > AcDbBlockTableRecord *pBTR;
> > acdbHostApplicationService()->workingDatabase()->getBlockTable(pTable,
> > AcDb::kForRead);
> > pTable->getAt(ACDB_MODEL_SPACE, pBTR, AcDb::kForWrite);
> > pTable->close();
> > pBTR->appendAcDbEntity(pPline);
> > pBTR->close();
> > pPline->close();
> >
> >
> > Tada....
> >
> > Read through the example problems and online help that ship with the
SDK -
> > they're wonderful!
> >
> > --
> > Jon Rizzo
> > Langan Engineering and Environmental Services, Inc.
> >
> >
>
>
Message 6 of 7
Anonymous
in reply to: Anonymous

On Thu, 19 Jul 2001 07:45:12 -0700, "Rob" wrote:

>Im gonna need to to this with 3d points-------is there away to convert the
>lines I have drawn to a pline??
>
>Thanks for the info
>
>
You can only set the elevation of the polyline, not a specific Z value
for each vertex.

Use the setElevation(double z); to set a Z value for all vertecies.

// Anders
Message 7 of 7
Anonymous
in reply to: Anonymous

hi all,

 

"you can draw an AcDb3dPolyline using 3d points, but they cannot have arc segments. If I am not mistaken, you can't extrude a 3d polyline, either..."

 

Your first afirmation is right you can't have an arc in a 3d Polyline

But your Second is wrong : Autocad allow to extrud along a 3d polyline 🙂

 

Enjoy,

 

Aymeric

 

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

Post to forums  

Autodesk Design & Make Report

”Boost