_
公共子ReadAllLinesStartPoint()
Dim doc As Document=DocumentManager。MdiActiveDocument
Dim db As Database=doc。数据库
Dim ed As Editor=doc。编辑
使用tr作为事务=db。TransactionManager。开始交易
Dim bt As BlockTable=db。BlockTableId。GetObject(OpenMode.ForRead)
Dim btr As BlockTableRecord=bt(BlockTableRecord.ModelSpace)。GetObject(OpenMode.ForRead)
对于btr中作为ObjectId的每个对象
Dim ent As Entity=对象。GetObject(OpenMode.ForRead)
如果ent的类型为Line,则
Dim l As Line=TryCast(ent,Line)
ed.WriteMessage(vbCrLf&l.StartPoint.ToString())
如果结束
下一个
tr.提交()
结束使用
末端接头