明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 871|回复: 0

[基础] 请教两个问题

[复制链接]
发表于 2014-6-19 10:27 | 显示全部楼层 |阅读模式
环境浩辰CAD机械2014,vs2010 vb.net

1、我修改明细栏的块属性:
atts = mGEntity.getAttributes
        For i = LBound(atts) To UBound(atts)
            att = atts(i)
            If Not att Is Nothing Then
                If dic.ContainsKey(att.TagString) Then
                    att.TextString = dic.Item(att.TagString)
                End If
            End If
        Next
        mGEntity.Update()

当原来属性值不为空时,修改后属性显示字体和系统字体一致,为空时修改,字体就变宽了。

2、我在图中拖动一个序号,自动生成序号元素,并生成明细栏列表。用修改块属性的方法可以修改明细栏,但是不能修改序号元素的属性,就造成序号元素和明细栏属性不一致。因为不是块,getAttributes方法不能获取东西。请问怎么修改。
   Dim ent As GcadEntity
        Dim sonEnt As GcadEntity
        Dim app As GcadApplication = GetObject(, m_GcadVer)
        For Each ent In app.ActiveDocument.ModelSpace
            If ent.ObjectName = "HC_XuHaoEntity" Then
                MsgBox(ent.ObjectName)
                'Dim db As ent.dab
                'Dim frm As New FormAttributes(ent)
                'frm.ShowDialog()
            End If
        Next
    End Sub

本帖子中包含更多资源

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

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-2 08:13 , Processed in 0.281002 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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