CAD设计论坛

 找回密码
 立即注册
论坛新手常用操作帮助系统等待验证的用户请看获取社区币方法的说明新注册会员必读(必修)
查看: 1498|回复: 1

[求助] autocad 块插入属性不在设定的位置

[复制链接]
发表于 2010-4-9 15:01 | 显示全部楼层 |阅读模式
'添加块定义; N3 ?/ P7 \5 H( ?* l
Dim blkDef As AcadBlock+ n. o9 W! q$ s  D0 k
Set blkDef = ThisDrawing.Blocks.Add(BasePoint, "*U")! z$ K1 l* v; N0 w: I/ T
'向块中增加多段线  T3 @9 P$ Q- I, s; A
Dim LineObject As AcadLWPolyline
* n& [, [$ d8 ]( f0 o  w7 f5 ASet LineObject = blkDef.AddLightWeightPolyline(LineVerts)  '画多段线
4 H( l' B! f. B& R" D'增加10dB/10m属性* c1 V" V' @! l
Dim attributeObj As AcadAttribute# O; R, V4 I" d9 m
Dim DbBasePoint(0 To 2) As Double+ L- X( C" ?( B6 ~% J3 v/ a
DbBasePoint(0) = LineTextPoint(0): DbBasePoint(1) = LineTextPoint(1): DbBasePoint(2) = 0* n! T8 Q; }+ D4 U
DbRoation = LineTextPoint(2)4 Q0 H  a. n* X9 T- s
Set attributeObj = blkDef.AddAttribute(ThisDrawing.ActiveTextStyle.Height, acAttributeModeNormal, "插入馈线损耗", DbBasePoint, "馈线损耗", LineDb)' j! Y) ?  m  D( v9 V/ L6 b3 W
attributeObj.alignment = acAlignmentBottomCenter  '底部中心点
6 q  e8 h( K8 S. ^attributeObj.TextAlignmentPoint = DbBasePoint '重定义对齐点
  K% {2 j, N5 ^' _% ?- I0 f; q8 X
& D/ u$ C9 M# v9 _" c2 |, Z运行该程序后,插入该块,块的属性,应该距离线40mm,但却离开的很远。
  y  v2 j" u+ H3 M/ T2 ~但插入一个,在autocad界面拉动块的属性后,就正常了,思考了变天,不知道咋回事,% v- m* X. |7 [; @& Q; X0 Y4 ^4 ?8 O
大侠,帮忙啊

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
发表于 2010-4-11 21:27 | 显示全部楼层
块属性的位置是不是你最开始设置的时候就没放好啊- b1 O  C) r5 H% v+ a
你看下块属性里面可以调整位置的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关于|免责|隐私|版权|广告|联系|手机版|CAD设计论坛

GMT+8, 2025-2-23 07:02

CAD设计论坛,为工程师增加动力。

© 2005-2025 askcad.com. All rights reserved.

快速回复 返回顶部 返回列表