Bryco 发表于 2007-4-24 15:22:09

是的,在你有标签的时候,你可以得到它#039;s插入点。

Eloquintet 发表于 2007-4-25 00:04:35

不确定您想要什么,但如果您注释掉了if Not(aLayout.ModelType),则通过添加'如果您将获得每个块引用,请在其前面注释出相应的结尾,
如果您只希望模型空间中的块,请使用我提供的内容或替换;如果不是(aLayout.ModelType),则;如果aLayout,则使用。然后输入型号If Not (aLayout.ModelType) Then
      For Each aEntity In aLayout.Block 'Loop thru all entities
      'If the current entity is a block insertion
      If TypeOf aEntity Is AcadBlockReference Then
          Set aBlkRef = aEntity 'Cast the entity into a block ref
          'If the block insertion has attributes
          If aBlkRef.HasAttributes Then
            'Use a procedure to add block to dictionary
            'Need procedure for isolated error handling
            AddBlock BlockStore, aBlkRef.Name, aBlkRef.GetAttributes
          End If
      End If
      Next aEntity
    End If

Bryco 发表于 2007-4-25 08:35:51

如果你读了上面的帖子,我还有一个问题。基本上,我从大楼的一个角落开始,然后把我的街区镜像到另一边。这会混淆属性,所以我使用了一个例程来交换值。唯一的问题是它没有't也交换标签。现在,我需要交换标签,以使该方法有效,或者,它可以在块内查找数字值,而不是查找标签,因为所有图纸名称都是数字的。有什么建议吗?

Eloquintet 发表于 2007-4-25 18:38:59

看看上面的文件,在那里我交换了一些属性值(和字符串内容),这可能会有所帮助。<p.S.Bryco比我更了解这一点

Eloquintet 发表于 2007-4-25 23:37:52

使用一些lisp重新插入错误的插入,测试isnumeric以确定哪个标记是哪个。在我看来,你需要花一点时间学习vba,因为你在这方面做了很多编程。它看起来确实比lisp简单得多。但是你的程序太复杂了,在不了解整个程序的情况下无法应用快速修复。
页: 1 [2]
查看完整版本: 从模型空间获取所有属性块