- 积分
- 162
- 明经币
- 个
- 注册时间
- 2015-4-14
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2015-4-17 09:36:28
|
显示全部楼层
雪山飞狐_lzh 发表于 2015-4-15 08:04
public PromptSelectionResult SelectImplied();
飞狐哥哥,请问我还能做什么,才能让panel在先选中了对象后显示出来,就用这个方法先选择后命令的
[CommandMethod("CheckForPickfirstSelection", CommandFlags.UsePickSet)]
public static void CheckForPickfirstSelection()
{
int nMaxSort = System.Convert.ToInt32(Autodesk.AutoCAD.ApplicationServices.Application.GetSystemVariable("PICKFIRST"));
Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(nMaxSort.ToString());//测试
Autodesk.AutoCAD.ApplicationServices.Application.SetSystemVariable("PICKFIRST", 1);
Editor acDocEd = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
PromptSelectionResult acSSPrompt;
acSSPrompt = acDocEd.SelectImplied();
if (acSSPrompt.Status == PromptStatus.OK)
{
UserControl4 uc4 = new UserControl4();
uc4.panel1.Visible = true;
uc4.panel1.Location = new Point(0, 0);
}
else
{
UserControl4 uc4 = new UserControl4();
uc4.panel1.Location = new Point(-1000, -10000);
}
} |
|