Exemplo n.º 1
0
        /// <summary>
        /// 生成新的G3E系列ID
        /// </summary>
        /// <param name="OldG3e_fid"></param>
        /// <param name="OldG3e_id"> </param>
        /// <param name="newObjectId"> </param>
        public void CreateG3EFID(long OldG3e_fid, long OldG3e_id, ObjectId newObjectId)
        {
            var entity = PublicMethod.Instance.GetObject(newObjectId, OpenMode.ForRead);

            if (!_G3EIdMapping.ContainsKey(OldG3e_fid))
            {
                var ed = new ExpandsData
                {
                    newG3e_id   = CYZCommonFunc.getid(),
                    newG3e_fid  = CYZCommonFunc.getid(),
                    oldG3e_id   = OldG3e_id,
                    oldG3e_fid  = OldG3e_fid,
                    newObjectId = newObjectId
                };
                _G3EIdMapping.Add(OldG3e_fid, ed);
            }
            else
            {
                //只存储点符号的对象ID(不存储标注)
                if (entity is BlockReference)
                {
                    var aa = _G3EIdMapping[OldG3e_fid];
                    aa.newObjectId = newObjectId;
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 生成新的G3E系列ID
 /// </summary>
 /// <param name="OldG3e_fid"></param>
 /// <param name="oldParentG3e_id"> </param>
 /// <param name="g3e_IdMapping"></param>
 /// <returns></returns>
 public Dictionary <long, ExpandsData> CreateG3EFID(long OldG3e_fid, long oldParentG3e_id, Dictionary <long, ExpandsData> g3e_IdMapping)
 {
     if (!g3e_IdMapping.ContainsKey(OldG3e_fid))
     {
         var ed = new ExpandsData
         {
             newG3e_id       = CYZCommonFunc.getid(),
             newG3e_fid      = CYZCommonFunc.getid(),
             oldG3e_fid      = OldG3e_fid,
             oldParentG3e_Id = oldParentG3e_id
         };
         g3e_IdMapping.Add(OldG3e_fid, ed);
     }
     return(g3e_IdMapping);
 }