不确定您想要什么,但如果您注释掉了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
|