zoukankan      html  css  js  c++  java
  • AutoCAD.Net/C#.Net QQ群:193522571 resultbuffer 中的typedvalue

    ResultBuffer中的TypedValue ,5005,5006,5009都代表什么类型? 

                    //运行命令
                    ResultBuffer rb = new ResultBuffer();
                    rb.Add(new TypedValue(5005, "_revcloud"));
                    if (!cloudType)
                    {
                        rb.Add(new TypedValue(5005, "_s"));
                        rb.Add(new TypedValue(5005, "_c"));
                    }
                    else
                    {
                        rb.Add(new TypedValue(5005, "_s"));
                        rb.Add(new TypedValue(5005, "_n"));
                    }
                    rb.Add(new TypedValue(5005, "_a"));
                    rb.Add(new TypedValue(5005, smallArc.ToString()));
                    rb.Add(new TypedValue(5005, largeArc.ToString()));
                    rb.Add(new TypedValue(5005, "_o"));
                    rb.Add(new TypedValue(5006, polyId));
                    rb.Add(new TypedValue(5005, "_n"));
                    ed.AcedCmd(rb);
    #if (V2013 || V2015)
            //调用AutoCAD命令,ARX原型:int acedCmd(const struct resbuf * rbp);
            [DllImport("accore.dll", EntryPoint = "acedCmd", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
    #elif(V2007)
        //调用AutoCAD命令,ARX原型:int acedCmd(const struct resbuf * rbp);
        [DllImport("acad.exe", CallingConvention = CallingConvention.Cdecl, EntryPoint = "acedCmd")]
    #endif
    
        private extern static int acedCmd(IntPtr rbp);
        /// <summary>
        /// 调用C++的acedCmd函数
        /// </summary>
        /// <param name="ed">无意义,只是为了定义扩展函数</param>
        /// <param name="args">命令参数列表</param>
        /// <returns>返回命令执行的状态</returns>
        public static int AcedCmd(this Editor ed, ResultBuffer args)
        {
          //由于acedCmd只能在程序环境下运行,因此需调用此语句
          if (!AcadApp.DocumentManager.IsApplicationContext)
          {
            int i = acedCmd(args.UnmanagedObject);
            return i;
          }
          else
          {
            return 0;
          }
        }
  • 相关阅读:
    Codefores 506A Mr. Kitayuta, the Treasure Hunter( DP && dfs )
    Goals ? Ideals ?
    HDU 5159 Card( 计数 期望 )
    HDU 1387 Team Queue( 单向链表 )
    HDU 1709 The Balance( DP )
    HDU 2152 Fruit( DP )
    HDU 1398 Square Coins(DP)
    HDU 5155 Harry And Magic Box( DP )
    HDU 3571 N-dimensional Sphere( 高斯消元+ 同余 )
    最大连续自序列
  • 原文地址:https://www.cnblogs.com/swtool/p/11319116.html
Copyright © 2011-2022 走看看