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

How do you draw polylines in different planes?

2 REPLIES 2
Reply
Message 1 of 3
michael_vanhoose
719 Views, 2 Replies

How do you draw polylines in different planes?

How do you draw polylines in different planes?  If I set the normal it does nothing.  I would like to use polyline2d because you can use bulges and not with polyline3d.

 

<CommandMethod(

"testpline")> _

Public

Subtestpline()

 

'' Get the current document and database, and start a transactionDim acDoc AsDocument = Application.DocumentManager.MdiActiveDocument

 

Dim acCurDb AsDatabase = acDoc.Database

 

Using acTrans AsTransaction = acCurDb.TransactionManager.StartTransaction()

 

'' Open the Block table for readDim acBlkTbl AsBlockTable

acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, _

OpenMode.ForRead)

'' Open the Block table record Model space for writeDim acBlkTblRec AsBlockTableRecord

acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), _

OpenMode.ForWrite)

Dim pcol AsNewPoint3dCollection

pcol.Add(

NewPoint3d(0, 0, 0))

pcol.Add(

NewPoint3d(0, 0, 5))

 

Dim myBulges AsNewDoubleCollection

myBulges.Add(0)

myBulges.Add(Math.Tan((90 / 4) * Math.PI / 180))

Dim entpLine AsNew Polyline2d(Poly2dType.SimplePoly, pcol, 0, False, 0, 0, Nothing)

entpLine.Normal =

NewVector3d(1, 0, 0)

 

'' Add the new object to the block table record and the transaction

acBlkTblRec.AppendEntity(entpLine)

acTrans.AddNewlyCreatedDBObject(entpLine,

True)

 

'' Save the new objects to the database

acTrans.Commit()

EndUsingEndSub

2 REPLIES 2
Message 2 of 3
kdub_nz
in reply to: michael_vanhoose

 

by definition :

polyline2d will be drawn planar.

 

Regards

 


// Called Kerry in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect.

class keyThumper<T> : Lazy<T>;      another  Swamper

Message 3 of 3

Thanks, for your reply.  But, I did figure out the a way by using the normal and transform.  But now I forgot how to make a bulge.  The bulge is going backwords.

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