对我来说,夹具与块注释性工程。
是否在当前空间(当前空间)中添加了块引用。AppendEntity(br)?
将当前注释性比例添加到块参照的位置(br。添加上下文(occ。当前上下文)?
尝试替换ObjectContexts。AddContext(btr2,occ。当前上下文);带br。添加上下文(occ。当前上下文);
示例https://www . keanw . com/2015/05/jigging-an-AutoCAD-block-with-attributes-using-net-redux . html
- var currentSpace = (BlockTableRecord)tr.GetObject(m_db.CurrentSpaceId, OpenMode.ForWrite);
- br.TransformBy(m_doc.Editor.CurrentUserCoordinateSystem);
- currentSpace.AppendEntity(br);
- tr.AddNewlyCreatedDBObject(br, true);
- if (btr.Annotative == AnnotativeStates.True)
- {
- ObjectContextManager ocm = m_db.ObjectContextManager;
- ObjectContextCollection occ = ocm.GetContextCollection("ACDB_ANNOTATIONSCALES");
- br.AddContext(occ.CurrentContext);
- }
- else
- {
- br.ScaleFactors = new Scale3d(br.UnitFactor);
- }
|