Beispiel #1
0
        static public void D()
        {
            StandardLineWrapper sl = new StandardLineWrapper();

            Database db = Application.DocumentManager.MdiActiveDocument.Database;

            Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;

            using (Transaction myT = tm.StartTransaction())
            {
                BlockTable       bt  = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false);
                BlockTableRecord btr = (BlockTableRecord)tm.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false);
                btr.AppendEntity(sl);
                tm.AddNewlyCreatedDBObject(sl, true);
                myT.Commit();
            }
        }
Beispiel #2
0
 private void UpdataDimension()
 {
     if (mPromptCounter == 0)
     {
         StandardLineWrapper myStandardLine = (StandardLineWrapper)Entity;
         AlignedDimension    dim            = (AlignedDimension)m_dims[0].Dimension;
         //  dim.XLine1Point = myStandardLine.StartPoint;
         dim.XLine2Point = mInflectionPt;
         //  dim.DimLinePoint = myStandardLine.StartPoint;
     }
     else if (mPromptCounter == 1)
     {
         StandardLineWrapper myStandardLine = (StandardLineWrapper)Entity;
         AlignedDimension    dim            = (AlignedDimension)m_dims[1].Dimension;
         dim.XLine1Point  = myStandardLine.InflectionPoint;
         dim.XLine2Point  = mEndPt;
         dim.DimLinePoint = myStandardLine.InflectionPoint;
     }
 }