ads_name ss; //執行預選 好像可以無視PICKSTYLE變量 if (RTNORM != acedSSGet(_T("I"),NULL,NULL,NULL,ss)) { //預選失敗執行手動選擇 if (RTNORM != acedSSGet(NULL,NULL,NULL,NULL,ss)) { return; } } Adesk::Int32 nLength=0; acedSSLength(ss,&nLength); acutPrintf(_T("\n共選擇了%d個對象!"),nLength); //亮顯對象 acedSSSetFirst(ss,NULL); //acedCommand(RTSTR,_T("select"),RTPICKS,ss,RTSTR,_T(""),RTNONE); //acedCommand(RTSTR,_T("pselect"),RTPICKS,ss,RTSTR,_T(""),RTNONE); acedSSFree(ss);
注:添加命令需要添加 ACRX_CMD_USEPICKSET | ACRX_CMD_REDRAW