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

acedCommand() error

3 REPLIES 3
Reply
Message 1 of 4
Robert-
268 Views, 3 Replies

acedCommand() error

Hello,



I use the acedCommand - command to zoom to a certain entity. When I want to zoom to a text through zooming to the min and max point of the geometric extends of the text acedcommand returns -5001, that means error.


Here is my code:

Acad::ErrorStatus es;:

AcDbExtents ext;

es = pEnt->getGeomExtents(ext);

if (es != eOk)

return FALSE;

AcGePoint3d min, max;

min = ext.minPoint();

max = ext.maxPoint();

ads_point adsmin, adsmax;

adsmin[0] = min[0];

adsmin[1] = min[1];

adsmin[2] = min[2];

adsmax[0] = max[0];

adsmax[1] = max[1];

adsmax[2] = max[2];

int a = acedCommand
(RTSTR,"_.zoom",RTPOINT,adsmin,RTPOINT,adsmax,0);

For example zooming to a polyline works fine. The min and max points are calculated correctly.


Has somebody an idea?



with kind regards,

Robert
3 REPLIES 3
Message 2 of 4
Robert-
in reply to: Robert-

Is is possible that the text is too small to zoom?
I think in my test there were only 3 units difference between min and max points.
Message 3 of 4
Robert-
in reply to: Robert-

I´m deceived with the text. The error is caused at all kind of entities. I use the procedure above twice. Once I select an entity wint acedEntSel and give the ID to this function. The other time I search the entity in the acad database. When I select the entity manually it works, the other case doesn´t work. Why?
Message 4 of 4
Anonymous
in reply to: Robert-

On Thu, 24 Jul 2003 22:48:39 -0700, Robert- wrote:

Hi Robert,

> int a = acedCommand
> (RTSTR,"_.zoom",RTPOINT,adsmin,RTPOINT,adsmax,0); What's about:
int a = acedCommand
(RTSTR,"_.zoom",RTSTR, "W", RTPOINT,adsmin,RTPOINT,adsmax,0);

--
Arnold Eibel
eibel@gmx.de
Music Trade list at:
http://db.etree.org/anodl

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

Post to forums  

Autodesk Design & Make Report

”Boost