Hi,
I'd like to isolate or hide objects like command _isolateobjects. So my idea is to change the visibility for each object/entity, but how to tell AutoCAD that an isolation is active? My goal is to interact with the isolation icon in the status bar (bottom right) and to be able to click on End Object Isolation:
All suggestions are welcomed.
Regards,
Jonathan
Solved! Go to Solution.
Solved by maisoui. Go to Solution.
Hi,
I'm also interested in driving this feature using object arx, I've unfortunately found nothing about this in the documentation. I should like to bring this topic up on the list in case of someone at autodesk could give us more information.
cheers
Loic Jourdan
Hi Jonathan,
I belief that there is no API to interact with the isolate command or the icon in the status bar. But you can call the isolate command from your code.
Try something like that:
AcDbObjectIdArray arrIds; // fill arrIds with the object ids of the objects you want to isolate ... ... if (arrIds.length()) { ads_name ss; acedSSAdd(NULL,NULL,ss); for (int i=0; i<arrIds.length();++i) { ads_name eName; acdbGetAdsName(eName,arrIds.at(i)); acedSSAdd(eName,ss,ss); } acedCommand( RTSTR, _T("_ISOLATEOBJECTS"), RTPICKS, ss, RTSTR, _T(""), RTNONE ); }
HTH
Arnold
Yes you're right, but it will not be integrated with AutoCad Object Isolation (as I mentionned).
Maybe you didn't read my entire question?
Regards,
The solution of Anodl works very well, even if woking with AutoCAD commands is not my favorite code. A few remarks:
Acad::ErrorStatus es; //create selection set ads_name ss; acedSSAdd(NULL, NULL, ss); for(int i=0; i<ids.length(); ++i) { ads_name eName; es = acdbGetAdsName(eName, ids.at(i)); acedSSAdd(eName, ss, ss); } //execute command acedCommandS(RTSTR, bHide ? _T("_.hideobjects") : _T("_.isolateobjects"), RTPICKS, ss, RTSTR, _T(""), RTNONE); acedSSFree(ss);
Regards,