我认为:
- using (var attributeDefinition = new AcadDbServices.AttributeDefinition())
- {
- attributeDefinition.Tag = attribute;
- attributeDefinition.Visible = false;
- blockDefinition.AppendEntity(attributeDefinition);
- trans.AddNewlyCreatedDBObject(attributeDefinition, true);
- }
应该是这样的:
- using (var attributeDefinition = new AcadDbServices.AttributeDefinition())
- {
- blockDefinition.AppendEntity(attributeDefinition);
- trans.AddNewlyCreatedDBObject(attributeDefinition, true);
- attributeDefinition.Tag = attribute;
- attributeDefinition.Visible = false;
- }
|