ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

isA() and isKindOf()

1 REPLY 1
Reply
Message 1 of 2
Anonymous
765 Views, 1 Reply

isA() and isKindOf()

I'm unsure of how to filter for a hatch entity using the isKindOf() function

Here is a sample of what I'd like to do:

int res = acedSSGet ("", &clickPoint, NULL, NULL, ss);
if (acedSSName(ss, 0L, ent1) == RTNORM)
{
acdbGetObjectId(ent1ID, ent1);
acdbOpenAcDbEntity(pEnt1, ent1ID, AcDb::kForRead);

if (pEnt1->isKindOf (AcDbText::desc())){acutPrintf("\nText Selected");}
if (pEnt1->isKindOf (AcDbHatch::desc())) {acutPrintf ("Hatch Selected");}
if (pEnt1->isKindOf (AcDbDimension::desc())) {acutPrintf ("Dimension
Selected");}
pEnt1->close();
}

But the hatch entity doesn't support this. I could resort to a resbuf, but
would prefer an arx type solution.

Thanks,

Steve
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Sorry, it does work. I just forgot to include the dbhatch.h file...

"Steve Watts" wrote in message
news:4B319EF2791C6732A63DB6B561089BB8@in.WebX.maYIadrTaRb...
> I'm unsure of how to filter for a hatch entity using the isKindOf()
function
>
> Here is a sample of what I'd like to do:
>
> int res = acedSSGet ("", &clickPoint, NULL, NULL, ss);
> if (acedSSName(ss, 0L, ent1) == RTNORM)
> {
> acdbGetObjectId(ent1ID, ent1);
> acdbOpenAcDbEntity(pEnt1, ent1ID, AcDb::kForRead);
>
> if (pEnt1->isKindOf (AcDbText::desc())){acutPrintf("\nText Selected");}
> if (pEnt1->isKindOf (AcDbHatch::desc())) {acutPrintf ("Hatch
Selected");}
> if (pEnt1->isKindOf (AcDbDimension::desc())) {acutPrintf ("Dimension
> Selected");}
> pEnt1->close();
> }
>
> But the hatch entity doesn't support this. I could resort to a resbuf,
but
> would prefer an arx type solution.
>
> Thanks,
>
> Steve
>
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost