Custom Entity / _arrayrect

Custom Entity / _arrayrect

daniel_gearloose
Enthusiast Enthusiast
640 Views
4 Replies
Message 1 of 5

Custom Entity / _arrayrect

daniel_gearloose
Enthusiast
Enthusiast

I have a Custom Entity with a AcDbBlockReference in it.

But if I use _arrayrect on the Custom Entity the Array-Basepoint ist always at (0.0, 0.0, 0.0).

I think a Reactor can help again. Where the Array-Basepoint must be modified. But how to catch the Array?

LISP says it is called "INSERT" like a AcDbBlockReference.

 

((-1 . <Objektname: 2bf2c534d90>) (0 . "INSERT") (5 . "3629") (102 . "{ACAD_REACTORS") (330 . <Objektname: 2bf2c534e60>) (102 . "}") (330 . <Objektname: 2bf2c51f9f0>) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbBlockReference") (2 . "*U24") (10 0.0 0.0 0.0) (41 . 1.0) (42 . 1.0) (43 . 1.0) (50 . 0.0) (70 . 0) (71 . 0) (44 . 0.0) (45 . 0.0) (210 0.0 0.0 1.0))

 

... and the DXF 10 Value is like I said (10 0.0 0.0 0.0)

 

Any Ideas?

 

 

0 Likes
641 Views
4 Replies
Replies (4)
Message 2 of 5

daniel_gearloose
Enthusiast
Enthusiast

AcDbDatabaseReactor...

And how about if there some other Entities in the Array. How to respect that Custom Entity by finding the Center from Selection...

0 Likes
Message 3 of 5

daniel_gearloose
Enthusiast
Enthusiast

SDK Sample "polysamp" from 2019 SDK has the same "BUG"

0 Likes
Message 4 of 5

daniel_gearloose
Enthusiast
Enthusiast

Ok, i have NO IDEA.

Maybe a Workaround with "_arrayedit" -> Basepoint.

Or leave it like it is. Like in polysamp. XD

0 Likes
Message 5 of 5

tbrammer
Advisor
Advisor

I think AutoCAD calculates the geometric centerpoint of the entity/entities that are used in ARRAYEDIT and takes it as "Array Basepoint". So your custom entity must return meaningful extents in entity->getGeomExtents(extents). Thus you have to overwrite the virtual method

Acad::ErrorStatus subGetGeomExtents(AcDbExtents& extents) const;

in your class.


Thomas Brammer ● Software Developer ● imos AG ● LinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes