- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have tried to create a leader with simple code like below. After invoking the command, Leader line is there but I can not see the arrowhead. Can any body help me in this regard that why arrowhead is not created?
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Geometry
<CommandMethod("CreateLeader")> _
PublicSubCreateleader()
Dim acDoc AsDocument = Application.DocumentManager.MdiActiveDocument
Dim acCurDb AsDatabase= acDoc.Database
Using acTrans AsTransaction= acCurDb.TransactionManager.StartTransaction()
Dim acBlkTbl AsBlockTable
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead)
Dim acBlkTblRec AsBlockTableRecord
acBlkTblRec = acTrans.GetObject(acBlkTbl(
BlockTableRecord.ModelSpace), OpenMode.ForWrite)
Dim acLdr AsLeader = NewLeader()
acLdr.AppendVertex(NewPoint3d(2, 2, 0))
acLdr.AppendVertex(NewPoint3d(4, 4, 0))
acLdr.AppendVertex(NewPoint3d(4, 5, 0))
acLdr.HasArrowHead = True
acBlkTblRec.AppendEntity(acLdr)
acTrans.AddNewlyCreatedDBObject(acLdr, True)
acTrans.Commit()
End Using
End Sub
After creating the line, I have tried to see the properties of the leader. In Misc,'Type' is always 'Line with no arrow' and I cannot force it 'Line with arrow'. I am using VS 2010, ACAD 2011 and framework 3.5.
Please help me in this regard.
Zakir
Solved! Go to Solution.