VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

distance and height of displayed entities

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
211 Views, 2 Replies

distance and height of displayed entities

I'm using Acad2002.

Here's my need, I have a drawing with 3 entities on a thawed layer, it so
happens that these entities are circles in this particular drawing with
other drawings it could be blocks or lines or whatever. These entities are
some distance apart from each other. ie:

O
O

O

Is there a way, programmatically, to find the outside distance (in drawing
units) between the farthest apart entities and the outside height of the
farthest apart entities? I've tried all of the acad variables limmax,
limmin, viewsize, vsmax, vsmin, screensize and I don't get what I need. The
closest I've come to getting those outside dimensions, is by using zoom
extents
and storing the viewsize variable and then rotating the drawing and resizing
it and getting
the viewsize again. However, depending on the placement of the different
entities, I don't get the true distances. I'm looking for a more accurate
method.

Any input would be appreciated.

Thanks, Brent
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

Brent

Make a temporary block with all entities and GetBoundingBox...
get the distance of the X- and Y-part of GetBoundingBox.

Cheers
--
Juerg Menzi
MENZI ENGINEERING GmbH, Switzerland
http://www.menziengineering.ch
Message 3 of 3
Anonymous
in reply to: Anonymous

Thanks Jürg

"Jürg Menzi" wrote in message
news:3F0334E0.F1D005A6@bluewin.ch...
> Brent
>
> Make a temporary block with all entities and GetBoundingBox...
> get the distance of the X- and Y-part of GetBoundingBox.
>
> Cheers
> --
> Juerg Menzi
> MENZI ENGINEERING GmbH, Switzerland
> http://www.menziengineering.ch

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report