- 积分
- 1905
- 明经币
- 个
- 注册时间
- 2022-4-4
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
class BlockAtt:
def __init__(self,blockref) :
self.blockref = blockref
self.attdict={}
for attid in self.blockref.AttributeCollection:
att = attid.GetObject(OpenMode.ForWrite)
setattr(self,att.Tag,att)
def SetTextString(self,Tag,TextString):
getattr(self,Tag).TextString = TextString
def SetHeight(self,Tag,height):
getattr(self,Tag).Height= height
def GetTextString(self,Tag):
return getattr(self,Tag).TextString
def ChangeTagName(self,Tag,NewTagName):
if hasattr(self, NewTagName):
print("att has tag {0}".format(NewTagName))
else:
getattr(self, Tag).Tag=NewTagName
|
|