//***********************************************************
ads_name ss;
ads_name ent0, ent1;
struct resbuf *entdata;
if (acdbEntNext(NULL, ent0) != RTNORM) {
acdbFail("Drawing is empty\n"); // Does NOT happen
}
do {
// Get entity's definition data.
entdata = acdbEntGet(ent0);
if (entdata == NULL) {
acutPrintf("Failed to get entity\n");
}
int ret = 0;
// ************ THIS DOESN’T WORK
if( ret = acedSSGet("X", NULL, NULL, entdata, ss) != RTNORM)
{
acutPrintf("\nUnable get entity to selection set, ret = %d", ret );
}
acutRelRb(entdata); // Release the list.
ads_name_set(ent0, ent1); // Bump the name.
} while (acdbEntNext(ent1, ent0) == RTNORM);
//***********************************************************
Why doesn’t the entity become selected in each loop?
I got the return value: ret = 1.
Pleased for help
if( (ret = acedSSGet("X", NULL, NULL, entdata, ss)) != RTNORM)
"d00_ape" <nos...@address.withheld> wrote in message
news:10147713.109327161...@jiveforum2.autodesk.com...
How to do if I wnt to select an entity form its name, handle or someting.
In the end I want to iterate through all enteties and make a selection of each of them.
Thanks
coz if you have the handle or name of entity then you have all you need to
open it an do wathever you want with it.
Regards
Rex
"d00_ape" <nos...@address.withheld> schrieb im Newsbeitrag
news:20856730.109332860...@jiveforum1.autodesk.com...
1. I have an AutoCad drawing.
2. I want to iterate through all entities in the drawing and make a selection of each of them.
3. Call this function from ActiveX-API:
IControl::Convert(LPDISPATCH pSelection, LPCTSTR bsFilename)
the pSelection is of type: IAcadSelectionSet (AutoCad API)
4. At this time I do this call:
myIcadSelSet = IcadDoc.GetActiveSelectionSet();
to get the active selection set, which I get when calling:
ret = acedSSGet("A", NULL, NULL, NULL, ss)
5. But when I call:
ret = acedSSAdd(ent0, ss, ss)
it doesn’t become the active selection set.
Pleased for all tips how to solve my problem.
For e.g. can I, in some way, convert between these tow types:
ads_name (ObjectARX type)
and
IAcadSelectionSet (AutoCad API)
Regards
Rex
"d00_ape" <nos...@address.withheld> schrieb im Newsbeitrag
news:4866587.109333260...@jiveforum1.autodesk.com...
pseudo:
for( int i = 0; i < size; i++ )
{
myISelectionSet.Select( i );
// do stuff with myISelectionSet
}