autocad 块插入属性不在设定的位置
'添加块定义Dim blkDef As AcadBlock
Set blkDef = ThisDrawing.Blocks.Add(BasePoint, "*U")
'向块中增加多段线
Dim LineObject As AcadLWPolyline
Set LineObject = blkDef.AddLightWeightPolyline(LineVerts)'画多段线
'增加10dB/10m属性
Dim attributeObj As AcadAttribute
Dim DbBasePoint(0 To 2) As Double
DbBasePoint(0) = LineTextPoint(0): DbBasePoint(1) = LineTextPoint(1): DbBasePoint(2) = 0
DbRoation = LineTextPoint(2)
Set attributeObj = blkDef.AddAttribute(ThisDrawing.ActiveTextStyle.Height, acAttributeModeNormal, "插入馈线损耗", DbBasePoint, "馈线损耗", LineDb)
attributeObj.alignment = acAlignmentBottomCenter'底部中心点
attributeObj.TextAlignmentPoint = DbBasePoint '重定义对齐点
运行该程序后,插入该块,块的属性,应该距离线40mm,但却离开的很远。
但插入一个,在autocad界面拉动块的属性后,就正常了,思考了变天,不知道咋回事,
大侠,帮忙啊 块属性的位置是不是你最开始设置的时候就没放好啊
你看下块属性里面可以调整位置的
页:
[1]