void LinRazm(ksDocument2D doc, double x1, double y1, double x2, double y2, short gde_strelka, double vect_x, double vect_y, int type_znaka, int smeschenie_texta = 0)
        {
            ksLDimParam param = (ksLDimParam)_kompas.GetParamStruct((short)StructType2DEnum.ko_LDimParam);

            if (param == null)
            {
                return;
            }

            ksDimDrawingParam dPar = (ksDimDrawingParam)param.GetDPar();
            ksLDimSourceParam sPar = (ksLDimSourceParam)param.GetSPar();
            ksDimTextParam    tPar = (ksDimTextParam)param.GetTPar();

            if (dPar == null || sPar == null || tPar == null)
            {
                return;
            }

            dPar.Init();
            dPar.textPos  = smeschenie_texta;
            dPar.textBase = 10;
            dPar.pt1      = gde_strelka; //стрелка внутри
            dPar.pt2      = gde_strelka;
            dPar.ang      = 30;
            dPar.lenght   = 20;


            sPar.Init();
            sPar.basePoint = 1;
            sPar.ps        = 2;
            sPar.x1        = x1;
            sPar.y1        = y1;
            sPar.x2        = x2;
            sPar.y2        = y2;
            sPar.dx        = vect_x;
            sPar.dy        = vect_y;

            tPar.Init(false);
            tPar.SetBitFlagValue(ldefin2d._AUTONOMINAL, true);
            tPar.SetBitFlagValue(ldefin2d._PREFIX, true);
            tPar.SetBitFlagValue(ldefin2d._DEVIATION, true);
            tPar.SetBitFlagValue(ldefin2d._UNIT, true);
            tPar.SetBitFlagValue(ldefin2d._SUFFIX, true);
            tPar.sign = type_znaka;


            int obj = doc.ksLinDimension(param);    //отрисовка
        }