如何保存SS并在Lisp(ssget)中使用?
我有一个ADS函数在命令模式下工作得很好:命令'SAVSS可以保存当前选择集,当您想使用它时,例如复制、移动...等
您可以输入'P1(或'P2或'P3或'P4)来获取选择集。
但是,int Lisp,例如:
(setq b(ssget)),它提示“无法重新输入Lisp”。我如何保存SS并在Lisp(ssget)中使用?
static int ads_p1(void)
{
long len;
int ret=acedSSLength(DocVars.docData().myss1,&len);
if(ret!=RTNORM) return RTERROR;
if (len==0) return RTERROR;
ret=acedRetName(DocVars.docData().myss1,RTPICKS);
if (ret==RTNORM)
{
acutPrintf(_T(""));
}
return (RSRSLT) ;
}
ACED_ADSCOMMAND_ENTRY_AUTO(CBYApp, p1, true)
这是vb
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim Opts As New PromptSelectionOptions()
Opts.Keywords.Add("myFence")
Opts.Keywords.Add("myWindow")
Opts.Keywords.Add("myWpoly")
Opts.Keywords.Add("myLastSel"
Opts.Keywords.Add("myPrevSel")
AddHandler Opts.KeywordInput, AddressOf handle_KeywordInput
.....
If e.Input.CompareTo("myPrevSel") = 0 Then
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim res As PromptSelectionResult = ed.SelectPrevious()
If res.Status = PromptStatus.Error Then
Return
End If
Dim SS As Autodesk.AutoCAD.EditorInput.SelectionSet = res.Value
Dim idarray As ObjectId() = SS.GetObjectIds()
e.AddObjects(idarray)
End If
中的另一个示例
**** Hidden Message ***** 为什么不在ARX SelectionSet上调用acedssetFirst(),然后在LISP中调用(ssget)来获取隐含的选择
http://adndevblog.typepad.com/autocad/2012/05/adding-and-removing-the-entities-from-pick-first-selection-set-using-objectarx.html
干杯 (ssget)仍然提示“无法重新输入Lisp” 对于名为ss type的选择集!ss来响应“选择对象”提示。
页:
[1]