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

Calculate Area of an Entity by Pick an Internal Point

1 REPLY 1
Reply
Message 1 of 2
nathan307
492 Views, 1 Reply

Calculate Area of an Entity by Pick an Internal Point

Dear Friends,

    How to calculate Area of An entity by pick an Internal Point.

    How to Select an Entity by pick an internal point and How to get the ID of that selected Entity

1 REPLY 1
Message 2 of 2
nur91m
in reply to: nathan307

I don't understand your first question about area calculation. What kind of entity's area do you want to calculate? Text??!! Smiley Indifferent

To select entity you need use acedSSGet. Here is code to get selected entity's ID

ads_name ss, ent; 
	AcDbObjectId id = AcDbObjectId::kNull;
	int i=acedSSGet(NULL, NULL, NULL, NULL, ss);  // Pick some entities
	long length = 0;
if ((acedSSLength(ss, &length) != RTNORM) & (length == 0)) {
	acedSSFree( ss );}

for (long i = 0; i < length; i++)                    
{
        if (acedSSName(ss,i,ent) != RTNORM) continue;
        acdbGetObjectId(id,ent);                     // here is your ID
}

 

 

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost