資源簡介
AutoCAD 2013 執行命令 方法

代碼片段和文件信息
using?System;
using?System.Collections;
using?System.Collections.Generic;
using?System.Runtime.InteropServices;
using?Autodesk.AutoCAD.ApplicationServices;
using?Autodesk.AutoCAD.DatabaseServices;
using?Autodesk.AutoCAD.Geometry;
using?Autodesk.AutoCAD.Runtime;
namespace?ToolPaletteGas
{
????/*???public?static?class?EditorInputExtensionMethods
????????{
????????????public?static?PromptStatus?Command(this?Editor?editor?params?object[]?args)
????????????{
????????????????if?(editor?==?null)
????????????????????throw?new?ArgumentNullException(“editor“);
????????????????return?runCommand(editor?args);
????????????}
????????????static?Funcject[]?PromptStatus>?runCommand?=?GenerateRunCommand();
????????????static?Funcject[]?PromptStatus>?GenerateRunCommand()
????????????{
????????????????MethodInfo?method?=?typeof(Editor).GetMethod(“RunCommand“
???????????????????BindingFlags.Instance?|?BindingFlags.NonPublic?|?BindingFlags.Public);
????????????????var?instance?=?expression.Parameter(typeof(Editor)?“instance“);
????????????????var?args?=?expression.Parameter(typeof(object[])?“args“);
????????????????return?expression.Lambdaject[]?PromptStatus>>(
???????????????????expression.Call(instance?method?args)?instance?args)
??????????????????????.Compile();
????????????}
????????}
????????*/
????public?static?class?AboutCMD
????{
????????[System.Security.SuppressUnmanagedCodeSecurity]
????????[DllImport(“accore.dll“?EntryPoint?=?“acedCmdS“?CharSet?=?CharSet.Auto?CallingConvention?=?CallingConvention.Cdecl)]
????????extern?static?private?int?acedCmdS(IntPtr?resbuf);
????????public?static?bool?HasCommand?=?false;
????????public?static?Listject>?BufferCommand?=?new?Listject>();
????????public?const?string?PauseToken?=?@“\“;
????????private?static?Hashtable?resTypes;//
????????/*??public?static?void?RunCommand(bool?echoCommand?params?object[]?args)
??????????{
??????????????Document?doc?=?Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
??????????????doc.Editor.Command(args);
????????????
??????????}
??????????public?static?void?RunBurrerCommand()
??????????{
??????????????if?(HasCommand?==?true)
??????????????{
?????????????????
??????????????????Document?doc?=?Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;
??????????????????doc.Editor.Command(BufferCommand.ToArray());
??????????????????
??????????????}
??????????????HasCommand?=?false;
??????????????BufferCommand.Clear();
??????????}
?????????*/
????????static?AboutCMD()
????????{
????????????resTypes?=?new?Hashtable();
????????????resTypes[typeof(String)]?=?(int)LispDataType.Text;
????????????resTypes[typeof(string)]?=?(short)0x138d;
????????????resTypes[typeof(double)]?=?(short)0x1389;
????????????resTypes[typeof(Point3d)]?=?(short)0x1391;
????????????resTypes[typeof(objectId)]?=?(short)0x138e;
??????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????6445??2014-11-17?14:29??InvokeArx.cs
?????文件????????1787??2014-11-17?18:03??toolsPublicFun.cs
- 上一篇:Rockey4ND硬復制工具, 設置密碼及ID工具
- 下一篇:零相位濾波
評論
共有 條評論