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
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.